Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
via_wdt.c File Reference
#include <linux/device.h>
#include <linux/io.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/timer.h>
#include <linux/watchdog.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define VIA_WDT_MMIO_BASE   0xe8 /* MMIO region base address */
 
#define VIA_WDT_CONF   0xec /* watchdog enable state */
 
#define VIA_WDT_CONF_ENABLE   0x01 /* 1: enable watchdog */
 
#define VIA_WDT_CONF_MMIO   0x02 /* 1: enable watchdog MMIO */
 
#define VIA_WDT_MMIO_LEN   8 /* MMIO region length in bytes */
 
#define VIA_WDT_CTL   0 /* MMIO addr+0: state/control reg. */
 
#define VIA_WDT_COUNT   4 /* MMIO addr+4: timer counter reg. */
 
#define VIA_WDT_RUNNING   0x01 /* 0: stop, 1: running */
 
#define VIA_WDT_FIRED   0x02 /* 1: restarted by expired watchdog */
 
#define VIA_WDT_PWROFF   0x04 /* 0: reset, 1: poweroff */
 
#define VIA_WDT_DISABLED   0x08 /* 1: timer is disabled */
 
#define VIA_WDT_TRIGGER   0x80 /* 1: start a new countdown */
 
#define WDT_HW_HEARTBEAT   1
 
#define WDT_HEARTBEAT   (HZ/2) /* should be <= ((WDT_HW_HEARTBEAT*HZ)/2) */
 
#define WDT_TIMEOUT_MAX   1023 /* approx. 17 min. */
 
#define WDT_TIMEOUT   60
 

Functions

 module_param (timeout, int, 0)
 
 MODULE_PARM_DESC (timeout,"Watchdog timeout in seconds, between 1 and 1023 ""(default = "__MODULE_STRING(WDT_TIMEOUT)")")
 
 module_param (nowayout, bool, 0)
 
 MODULE_PARM_DESC (nowayout,"Watchdog cannot be stopped once started ""(default = "__MODULE_STRING(WATCHDOG_NOWAYOUT)")")
 
 module_pci_driver (wdt_driver)
 
 MODULE_AUTHOR ("Marc Vertes")
 
 MODULE_DESCRIPTION ("Driver for watchdog timer on VIA chipset")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 14 of file via_wdt.c.

#define VIA_WDT_CONF   0xec /* watchdog enable state */

Definition at line 26 of file via_wdt.c.

#define VIA_WDT_CONF_ENABLE   0x01 /* 1: enable watchdog */

Definition at line 29 of file via_wdt.c.

#define VIA_WDT_CONF_MMIO   0x02 /* 1: enable watchdog MMIO */

Definition at line 30 of file via_wdt.c.

#define VIA_WDT_COUNT   4 /* MMIO addr+4: timer counter reg. */

Definition at line 38 of file via_wdt.c.

#define VIA_WDT_CTL   0 /* MMIO addr+0: state/control reg. */

Definition at line 37 of file via_wdt.c.

#define VIA_WDT_DISABLED   0x08 /* 1: timer is disabled */

Definition at line 44 of file via_wdt.c.

#define VIA_WDT_FIRED   0x02 /* 1: restarted by expired watchdog */

Definition at line 42 of file via_wdt.c.

#define VIA_WDT_MMIO_BASE   0xe8 /* MMIO region base address */

Definition at line 25 of file via_wdt.c.

#define VIA_WDT_MMIO_LEN   8 /* MMIO region length in bytes */

Definition at line 36 of file via_wdt.c.

#define VIA_WDT_PWROFF   0x04 /* 0: reset, 1: poweroff */

Definition at line 43 of file via_wdt.c.

#define VIA_WDT_RUNNING   0x01 /* 0: stop, 1: running */

Definition at line 41 of file via_wdt.c.

#define VIA_WDT_TRIGGER   0x80 /* 1: start a new countdown */

Definition at line 45 of file via_wdt.c.

#define WDT_HEARTBEAT   (HZ/2) /* should be <= ((WDT_HW_HEARTBEAT*HZ)/2) */

Definition at line 51 of file via_wdt.c.

#define WDT_HW_HEARTBEAT   1

Definition at line 48 of file via_wdt.c.

#define WDT_TIMEOUT   60

Definition at line 55 of file via_wdt.c.

#define WDT_TIMEOUT_MAX   1023 /* approx. 17 min. */

Definition at line 54 of file via_wdt.c.

Function Documentation

MODULE_AUTHOR ( "Marc Vertes"  )
MODULE_DESCRIPTION ( "Driver for watchdog timer on VIA chipset )
MODULE_LICENSE ( "GPL"  )
module_param ( timeout  ,
int  ,
 
)
module_param ( nowayout  ,
bool  ,
 
)
MODULE_PARM_DESC ( timeout  ,
"Watchdog timeout in  seconds,
between 1 and 1023""(default="__MODULE_STRING(WDT_TIMEOUT)")"   
)
MODULE_PARM_DESC ( nowayout  ,
"Watchdog cannot be stopped once started ""(default = "__MODULE_STRING(WATCHDOG_NOWAYOUT)")"   
)
module_pci_driver ( wdt_driver  )