Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
pnx833x_wdt.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/init.h>
#include <asm/mach-pnx833x/pnx833x.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define WATCHDOG_TIMEOUT   30 /* 30 sec Maximum timeout */
 
#define WATCHDOG_COUNT_FREQUENCY   68000000U /* Watchdog counts at 68MHZ. */
 
#define PNX_WATCHDOG_TIMEOUT   (WATCHDOG_TIMEOUT * WATCHDOG_COUNT_FREQUENCY)
 
#define PNX_TIMEOUT_VALUE   2040000000U
 
#define PNX833X_CONFIG   (0x07000U)
 
#define PNX833X_CONFIG_CPU_WATCHDOG   (0x54)
 
#define PNX833X_CONFIG_CPU_WATCHDOG_COMPARE   (0x58)
 
#define PNX833X_CONFIG_CPU_COUNTERS_CONTROL   (0x1c)
 
#define PNX833X_RESET   (0x08000U)
 
#define PNX833X_RESET_CONFIG   (0x08)
 
#define START_DEFAULT   1
 

Functions

 module_param (pnx833x_wdt_timeout, int, 0)
 
 MODULE_PARM_DESC (timeout,"Watchdog timeout in Mhz. (68Mhz clock), default="__MODULE_STRING(PNX_TIMEOUT_VALUE)"(30 seconds).")
 
 module_param (nowayout, bool, 0)
 
 MODULE_PARM_DESC (nowayout,"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")")
 
 module_param (start_enabled, int, 0)
 
 MODULE_PARM_DESC (start_enabled,"Watchdog is started on module insertion ""(default="__MODULE_STRING(START_DEFAULT)")")
 
 module_init (watchdog_init)
 
 module_exit (watchdog_exit)
 
 MODULE_AUTHOR ("Daniel Laird/Andre McCurdy")
 
 MODULE_DESCRIPTION ("Hardware Watchdog Device for PNX833x")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS_MISCDEV (WATCHDOG_MINOR)
 

Macro Definition Documentation

#define PNX833X_CONFIG   (0x07000U)

CONFIG block

Definition at line 41 of file pnx833x_wdt.c.

#define PNX833X_CONFIG_CPU_COUNTERS_CONTROL   (0x1c)

Definition at line 44 of file pnx833x_wdt.c.

#define PNX833X_CONFIG_CPU_WATCHDOG   (0x54)

Definition at line 42 of file pnx833x_wdt.c.

#define PNX833X_CONFIG_CPU_WATCHDOG_COMPARE   (0x58)

Definition at line 43 of file pnx833x_wdt.c.

#define PNX833X_RESET   (0x08000U)

RESET block

Definition at line 47 of file pnx833x_wdt.c.

#define PNX833X_RESET_CONFIG   (0x08)

Definition at line 48 of file pnx833x_wdt.c.

#define PNX_TIMEOUT_VALUE   2040000000U

Definition at line 38 of file pnx833x_wdt.c.

#define PNX_WATCHDOG_TIMEOUT   (WATCHDOG_TIMEOUT * WATCHDOG_COUNT_FREQUENCY)

Definition at line 37 of file pnx833x_wdt.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 20 of file pnx833x_wdt.c.

#define START_DEFAULT   1

Definition at line 63 of file pnx833x_wdt.c.

#define WATCHDOG_COUNT_FREQUENCY   68000000U /* Watchdog counts at 68MHZ. */

Definition at line 36 of file pnx833x_wdt.c.

#define WATCHDOG_TIMEOUT   30 /* 30 sec Maximum timeout */

Definition at line 35 of file pnx833x_wdt.c.

Function Documentation

MODULE_ALIAS_MISCDEV ( WATCHDOG_MINOR  )
MODULE_AUTHOR ( "Daniel Laird/Andre McCurdy"  )
MODULE_DESCRIPTION ( "Hardware Watchdog Device for PNX833x"  )
module_exit ( watchdog_exit  )
module_init ( watchdog_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( pnx833x_wdt_timeout  ,
int  ,
 
)
module_param ( nowayout  ,
bool  ,
 
)
module_param ( start_enabled  ,
int  ,
 
)
MODULE_PARM_DESC ( timeout  ,
"Watchdog timeout in Mhz.   68Mhz clock 
)
MODULE_PARM_DESC ( nowayout  ,
"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")"   
)
MODULE_PARM_DESC ( start_enabled  ,
"Watchdog is started on module insertion ""(default="__MODULE_STRING(START_DEFAULT)")"   
)