Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
dw_wdt.c File Reference
#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/fs.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/pm.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <linux/timer.h>
#include <linux/uaccess.h>
#include <linux/watchdog.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define WDOG_CONTROL_REG_OFFSET   0x00
 
#define WDOG_CONTROL_REG_WDT_EN_MASK   0x01
 
#define WDOG_TIMEOUT_RANGE_REG_OFFSET   0x04
 
#define WDOG_CURRENT_COUNT_REG_OFFSET   0x08
 
#define WDOG_COUNTER_RESTART_REG_OFFSET   0x0c
 
#define WDOG_COUNTER_RESTART_KICK_VALUE   0x76
 
#define DW_WDT_MAX_TOP   15
 
#define WDT_TIMEOUT   (HZ / 2)
 

Functions

 module_param (nowayout, bool, 0)
 
 MODULE_PARM_DESC (nowayout,"Watchdog cannot be stopped once started ""(default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")")
 
ssize_t dw_wdt_write (struct file *filp, const char __user *buf, size_t len, loff_t *offset)
 
 module_platform_driver (dw_wdt_driver)
 
 MODULE_AUTHOR ("Jamie Iles")
 
 MODULE_DESCRIPTION ("Synopsys DesignWare Watchdog Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS_MISCDEV (WATCHDOG_MINOR)
 

Macro Definition Documentation

#define DW_WDT_MAX_TOP   15

Definition at line 47 of file dw_wdt.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 20 of file dw_wdt.c.

#define WDOG_CONTROL_REG_OFFSET   0x00

Definition at line 39 of file dw_wdt.c.

#define WDOG_CONTROL_REG_WDT_EN_MASK   0x01

Definition at line 40 of file dw_wdt.c.

#define WDOG_COUNTER_RESTART_KICK_VALUE   0x76

Definition at line 44 of file dw_wdt.c.

#define WDOG_COUNTER_RESTART_REG_OFFSET   0x0c

Definition at line 43 of file dw_wdt.c.

#define WDOG_CURRENT_COUNT_REG_OFFSET   0x08

Definition at line 42 of file dw_wdt.c.

#define WDOG_TIMEOUT_RANGE_REG_OFFSET   0x04

Definition at line 41 of file dw_wdt.c.

#define WDT_TIMEOUT   (HZ / 2)

Definition at line 54 of file dw_wdt.c.

Function Documentation

ssize_t dw_wdt_write ( struct file filp,
const char __user buf,
size_t  len,
loff_t *  offset 
)

Definition at line 157 of file dw_wdt.c.

MODULE_ALIAS_MISCDEV ( WATCHDOG_MINOR  )
MODULE_AUTHOR ( "Jamie Iles"  )
MODULE_DESCRIPTION ( "Synopsys DesignWare Watchdog Driver"  )
MODULE_LICENSE ( "GPL"  )
module_param ( nowayout  ,
bool  ,
 
)
MODULE_PARM_DESC ( nowayout  ,
"Watchdog cannot be stopped once started ""(default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")"   
)
module_platform_driver ( dw_wdt_driver  )

Variable Documentation

Definition at line 59 of file dw_wdt.c.

int expect_close

Definition at line 63 of file dw_wdt.c.

unsigned long in_use

Definition at line 60 of file dw_wdt.c.

spinlock_t lock

Definition at line 57 of file dw_wdt.c.

unsigned long next_heartbeat

Definition at line 61 of file dw_wdt.c.

Definition at line 58 of file dw_wdt.c.

Definition at line 62 of file dw_wdt.c.