#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.
|
| #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 */ |
| |
|
| | 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) |
| |
| #define FER1 0x00 /* Function enable register 1 */ |
| #define FER2 0x01 /* Function enable register 2 */ |
| #define KBC_IRQ 0x01 /* Keyboard Controller */ |
| #define MAX_TIMEOUT 255 /* 255 minutes */ |
| #define MSE_IRQ 0x02 /* Mouse */ |
| #define PMC1 0x02 /* Power Management Ctrl 1 */ |
| #define PMC2 0x03 /* Power Management Ctrl 2 */ |
| #define PMC3 0x04 /* Power Management Ctrl 3 */ |
| #define pr_fmt |
( |
|
fmt | ) |
KBUILD_MODNAME ": " fmt |
| #define SC1200_MODULE_NAME "sc1200wdt" |
| #define SC1200_MODULE_VER "build 20020303" |
| #define UART1_IRQ 0x03 /* Serial0 */ |
| #define UART2_IRQ 0x04 /* Serial1 */ |
| #define WDCF 0x06 /* Watchdog config register */ |
| #define WDST 0x07 /* Watchdog status register */ |
| #define WDTO 0x05 /* Watchdog timeout register */ |
| module_exit |
( |
sc1200wdt_exit |
| ) |
|
| module_init |
( |
sc1200wdt_init |
| ) |
|
| module_param |
( |
io |
, |
|
|
int |
, |
|
|
0 |
|
|
) |
| |
| module_param |
( |
nowayout |
, |
|
|
bool |
, |
|
|
0 |
|
|
) |
| |
| MODULE_PARM_DESC |
( |
io |
, |
|
|
"io port" |
|
|
) |
| |
| MODULE_PARM_DESC |
( |
timeout |
, |
|
|
"range is 0-255 |
minutes, |
|
|
default is 1" |
|
|
) |
| |