Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
sc1200wdt.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/ioport.h>
#include <linux/spinlock.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/pnp.h>
#include <linux/fs.h>
#include <linux/semaphore.h>
#include <linux/io.h>
#include <linux/uaccess.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define SC1200_MODULE_VER   "build 20020303"
 
#define SC1200_MODULE_NAME   "sc1200wdt"
 
#define MAX_TIMEOUT   255 /* 255 minutes */
 
#define PMIR   (io) /* Power Management Index Register */
 
#define PMDR   (io+1) /* Power Management Data Register */
 
#define FER1   0x00 /* Function enable register 1 */
 
#define FER2   0x01 /* Function enable register 2 */
 
#define PMC1   0x02 /* Power Management Ctrl 1 */
 
#define PMC2   0x03 /* Power Management Ctrl 2 */
 
#define PMC3   0x04 /* Power Management Ctrl 3 */
 
#define WDTO   0x05 /* Watchdog timeout register */
 
#define WDCF   0x06 /* Watchdog config register */
 
#define WDST   0x07 /* Watchdog status register */
 
#define KBC_IRQ   0x01 /* Keyboard Controller */
 
#define MSE_IRQ   0x02 /* Mouse */
 
#define UART1_IRQ   0x03 /* Serial0 */
 
#define UART2_IRQ   0x04 /* Serial1 */
 

Functions

 module_param (io, int, 0)
 
 MODULE_PARM_DESC (io,"io port")
 
 module_param (timeout, int, 0)
 
 MODULE_PARM_DESC (timeout,"range is 0-255 minutes, default is 1")
 
 module_param (nowayout, bool, 0)
 
 MODULE_PARM_DESC (nowayout,"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")")
 
 module_init (sc1200wdt_init)
 
 module_exit (sc1200wdt_exit)
 
 MODULE_AUTHOR ("Zwane Mwaikambo <[email protected]>")
 
 MODULE_DESCRIPTION ("Driver for National Semiconductor PC87307/PC97307 watchdog component")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS_MISCDEV (WATCHDOG_MINOR)
 

Macro Definition Documentation

#define FER1   0x00 /* Function enable register 1 */

Definition at line 59 of file sc1200wdt.c.

#define FER2   0x01 /* Function enable register 2 */

Definition at line 60 of file sc1200wdt.c.

#define KBC_IRQ   0x01 /* Keyboard Controller */

Definition at line 69 of file sc1200wdt.c.

#define MAX_TIMEOUT   255 /* 255 minutes */

Definition at line 54 of file sc1200wdt.c.

#define MSE_IRQ   0x02 /* Mouse */

Definition at line 70 of file sc1200wdt.c.

#define PMC1   0x02 /* Power Management Ctrl 1 */

Definition at line 61 of file sc1200wdt.c.

#define PMC2   0x03 /* Power Management Ctrl 2 */

Definition at line 62 of file sc1200wdt.c.

#define PMC3   0x04 /* Power Management Ctrl 3 */

Definition at line 63 of file sc1200wdt.c.

#define PMDR   (io+1) /* Power Management Data Register */

Definition at line 56 of file sc1200wdt.c.

#define PMIR   (io) /* Power Management Index Register */

Definition at line 55 of file sc1200wdt.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 34 of file sc1200wdt.c.

#define SC1200_MODULE_NAME   "sc1200wdt"

Definition at line 52 of file sc1200wdt.c.

#define SC1200_MODULE_VER   "build 20020303"

Definition at line 51 of file sc1200wdt.c.

#define UART1_IRQ   0x03 /* Serial0 */

Definition at line 71 of file sc1200wdt.c.

#define UART2_IRQ   0x04 /* Serial1 */

Definition at line 72 of file sc1200wdt.c.

#define WDCF   0x06 /* Watchdog config register */

Definition at line 65 of file sc1200wdt.c.

#define WDST   0x07 /* Watchdog status register */

Definition at line 66 of file sc1200wdt.c.

#define WDTO   0x05 /* Watchdog timeout register */

Definition at line 64 of file sc1200wdt.c.

Function Documentation

MODULE_ALIAS_MISCDEV ( WATCHDOG_MINOR  )
MODULE_AUTHOR ( "Zwane Mwaikambo <[email protected]>"  )
MODULE_DESCRIPTION ( "Driver for National Semiconductor PC87307/PC97307 watchdog component )
module_exit ( sc1200wdt_exit  )
module_init ( sc1200wdt_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( io  ,
int  ,
 
)
module_param ( timeout  ,
int  ,
 
)
module_param ( nowayout  ,
bool  ,
 
)
MODULE_PARM_DESC ( io  ,
"io port  
)
MODULE_PARM_DESC ( timeout  ,
"range is 0-255  minutes,
default is 1"   
)
MODULE_PARM_DESC ( nowayout  ,
"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")"   
)