Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
at32ap700x_wdt.c File Reference
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/miscdevice.h>
#include <linux/fs.h>
#include <linux/platform_device.h>
#include <linux/watchdog.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/spinlock.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  wdt_at32ap700x
 

Macros

#define TIMEOUT_MIN   1
 
#define TIMEOUT_MAX   2
 
#define TIMEOUT_DEFAULT   TIMEOUT_MAX
 
#define WDT_CTRL   0x00
 
#define WDT_CTRL_EN   0
 
#define WDT_CTRL_PSEL   8
 
#define WDT_CTRL_KEY   24
 
#define WDT_CLR   0x04
 
#define WDT_RCAUSE   0x10
 
#define WDT_RCAUSE_POR   0
 
#define WDT_RCAUSE_EXT   2
 
#define WDT_RCAUSE_WDT   3
 
#define WDT_RCAUSE_JTAG   4
 
#define WDT_RCAUSE_SERP   5
 
#define WDT_BIT(name)   (1 << WDT_##name)
 
#define WDT_BF(name, value)   ((value) << WDT_##name)
 
#define wdt_readl(dev, reg)   __raw_readl((dev)->regs + WDT_##reg)
 
#define wdt_writel(dev, reg, value)   __raw_writel((value), (dev)->regs + WDT_##reg)
 
#define at32_wdt_suspend   NULL
 
#define at32_wdt_resume   NULL
 

Functions

 module_param (timeout, int, 0)
 
 MODULE_PARM_DESC (timeout,"Timeout value. Limited to be 1 or 2 seconds. (default="__MODULE_STRING(TIMEOUT_DEFAULT)")")
 
 module_param (nowayout, bool, 0)
 
 MODULE_PARM_DESC (nowayout,"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")")
 
 MODULE_ALIAS ("platform:at32_wdt")
 
 module_init (at32_wdt_init)
 
 module_exit (at32_wdt_exit)
 
 MODULE_AUTHOR ("Hans-Christian Egtvedt <egtvedt@samfundet.no>")
 
 MODULE_DESCRIPTION ("Watchdog driver for Atmel AT32AP700X")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS_MISCDEV (WATCHDOG_MINOR)
 

Macro Definition Documentation

#define at32_wdt_resume   NULL

Definition at line 422 of file at32ap700x_wdt.c.

#define at32_wdt_suspend   NULL

Definition at line 421 of file at32ap700x_wdt.c.

#define TIMEOUT_DEFAULT   TIMEOUT_MAX

Definition at line 39 of file at32ap700x_wdt.c.

#define TIMEOUT_MAX   2

Definition at line 38 of file at32ap700x_wdt.c.

#define TIMEOUT_MIN   1

Definition at line 37 of file at32ap700x_wdt.c.

#define WDT_BF (   name,
  value 
)    ((value) << WDT_##name)

Definition at line 69 of file at32ap700x_wdt.c.

#define WDT_BIT (   name)    (1 << WDT_##name)

Definition at line 68 of file at32ap700x_wdt.c.

#define WDT_CLR   0x04

Definition at line 59 of file at32ap700x_wdt.c.

#define WDT_CTRL   0x00

Definition at line 54 of file at32ap700x_wdt.c.

#define WDT_CTRL_EN   0

Definition at line 55 of file at32ap700x_wdt.c.

#define WDT_CTRL_KEY   24

Definition at line 57 of file at32ap700x_wdt.c.

#define WDT_CTRL_PSEL   8

Definition at line 56 of file at32ap700x_wdt.c.

#define WDT_RCAUSE   0x10

Definition at line 61 of file at32ap700x_wdt.c.

#define WDT_RCAUSE_EXT   2

Definition at line 63 of file at32ap700x_wdt.c.

#define WDT_RCAUSE_JTAG   4

Definition at line 65 of file at32ap700x_wdt.c.

#define WDT_RCAUSE_POR   0

Definition at line 62 of file at32ap700x_wdt.c.

#define WDT_RCAUSE_SERP   5

Definition at line 66 of file at32ap700x_wdt.c.

#define WDT_RCAUSE_WDT   3

Definition at line 64 of file at32ap700x_wdt.c.

#define wdt_readl (   dev,
  reg 
)    __raw_readl((dev)->regs + WDT_##reg)

Definition at line 71 of file at32ap700x_wdt.c.

#define wdt_writel (   dev,
  reg,
  value 
)    __raw_writel((value), (dev)->regs + WDT_##reg)

Definition at line 73 of file at32ap700x_wdt.c.

Function Documentation

MODULE_ALIAS ( "platform:at32_wdt"  )
MODULE_ALIAS_MISCDEV ( WATCHDOG_MINOR  )
MODULE_AUTHOR ( "Hans-Christian Egtvedt <egtvedt@samfundet.no>"  )
MODULE_DESCRIPTION ( "Watchdog driver for Atmel AT32AP700X"  )
module_exit ( at32_wdt_exit  )
module_init ( at32_wdt_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( timeout  ,
int  ,
 
)
module_param ( nowayout  ,
bool  ,
 
)
MODULE_PARM_DESC ( timeout  ,
"Timeout value. Limited to be 1 or 2 seconds. (default="__MODULE_STRING(TIMEOUT_DEFAULT)")"   
)
MODULE_PARM_DESC ( nowayout  ,
"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")"   
)