Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
at91sam9_wdt.c File Reference
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/types.h>
#include <linux/watchdog.h>
#include <linux/jiffies.h>
#include <linux/timer.h>
#include <linux/bitops.h>
#include <linux/uaccess.h>
#include "at91sam9_wdt.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define DRV_NAME   "AT91SAM9 Watchdog"
 
#define wdt_read(field)   __raw_readl(at91wdt_private.base + field)
 
#define wdt_write(field, val)   __raw_writel((val), at91wdt_private.base + field)
 
#define ms_to_ticks(t)   (((t << 8) / 1000) - 1)
 
#define ticks_to_ms(t)   (((t + 1) * 1000) >> 8)
 
#define WDT_HW_TIMEOUT   2
 
#define WDT_TIMEOUT   (HZ/2)
 
#define WDT_HEARTBEAT   15
 

Functions

 module_param (heartbeat, int, 0)
 
 MODULE_PARM_DESC (heartbeat,"Watchdog heartbeats in seconds. ""(default = "__MODULE_STRING(WDT_HEARTBEAT)")")
 
 module_param (nowayout, bool, 0)
 
 MODULE_PARM_DESC (nowayout,"Watchdog cannot be stopped once started ""(default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")")
 
 module_init (at91sam_wdt_init)
 
 module_exit (at91sam_wdt_exit)
 
 MODULE_AUTHOR ("Renaud CERRATO <[email protected]>")
 
 MODULE_DESCRIPTION ("Watchdog driver for Atmel AT91SAM9x processors")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS_MISCDEV (WATCHDOG_MINOR)
 

Macro Definition Documentation

#define DRV_NAME   "AT91SAM9 Watchdog"

Definition at line 38 of file at91sam9_wdt.c.

#define ms_to_ticks (   t)    (((t << 8) / 1000) - 1)

Definition at line 49 of file at91sam9_wdt.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 18 of file at91sam9_wdt.c.

#define ticks_to_ms (   t)    (((t + 1) * 1000) >> 8)

Definition at line 50 of file at91sam9_wdt.c.

#define WDT_HEARTBEAT   15

Definition at line 59 of file at91sam9_wdt.c.

#define WDT_HW_TIMEOUT   2

Definition at line 53 of file at91sam9_wdt.c.

#define wdt_read (   field)    __raw_readl(at91wdt_private.base + field)

Definition at line 40 of file at91sam9_wdt.c.

#define WDT_TIMEOUT   (HZ/2)

Definition at line 56 of file at91sam9_wdt.c.

#define wdt_write (   field,
  val 
)    __raw_writel((val), at91wdt_private.base + field)

Definition at line 42 of file at91sam9_wdt.c.

Function Documentation

MODULE_ALIAS_MISCDEV ( WATCHDOG_MINOR  )
MODULE_AUTHOR ( "Renaud CERRATO <[email protected]>"  )
MODULE_DESCRIPTION ( "Watchdog driver for Atmel AT91SAM9x processors"  )
module_exit ( at91sam_wdt_exit  )
module_init ( at91sam_wdt_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( heartbeat  ,
int  ,
 
)
module_param ( nowayout  ,
bool  ,
 
)
MODULE_PARM_DESC ( heartbeat  ,
"Watchdog heartbeats in seconds. ""(default = "__MODULE_STRING(WDT_HEARTBEAT)")"   
)
MODULE_PARM_DESC ( nowayout  ,
"Watchdog cannot be stopped once started ""(default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")"   
)

Variable Documentation

void __iomem* base

Definition at line 73 of file at91sam9_wdt.c.

char expect_close

Definition at line 76 of file at91sam9_wdt.c.

unsigned long next_heartbeat

Definition at line 74 of file at91sam9_wdt.c.

static int open

Definition at line 75 of file at91sam9_wdt.c.

Definition at line 77 of file at91sam9_wdt.c.