|
Linux Kernel
3.7.1
|
#include <linux/init.h>#include <linux/kernel.h>#include <linux/miscdevice.h>#include <linux/module.h>#include <linux/moduleparam.h>#include <linux/platform_device.h>#include <linux/watchdog.h>#include <linux/clk.h>#include <linux/fs.h>#include <linux/io.h>#include <linux/uaccess.h>#include <linux/timer.h>#include <linux/jiffies.h>#include <mach/hardware.h>Go to the source code of this file.
Macros | |
| #define | DRIVER_NAME "imx2-wdt" |
| #define | IMX2_WDT_WCR 0x00 /* Control Register */ |
| #define | IMX2_WDT_WCR_WT (0xFF << 8) /* -> Watchdog Timeout Field */ |
| #define | IMX2_WDT_WCR_WRE (1 << 3) /* -> WDOG Reset Enable */ |
| #define | IMX2_WDT_WCR_WDE (1 << 2) /* -> Watchdog Enable */ |
| #define | IMX2_WDT_WSR 0x02 /* Service Register */ |
| #define | IMX2_WDT_SEQ1 0x5555 /* -> service sequence 1 */ |
| #define | IMX2_WDT_SEQ2 0xAAAA /* -> service sequence 2 */ |
| #define | IMX2_WDT_WRSR 0x04 /* Reset Status Register */ |
| #define | IMX2_WDT_WRSR_TOUT (1 << 1) /* -> Reset due to Timeout */ |
| #define | IMX2_WDT_MAX_TIME 128 |
| #define | IMX2_WDT_DEFAULT_TIME 60 /* in seconds */ |
| #define | WDOG_SEC_TO_COUNT(s) ((s * 2 - 1) << 8) |
| #define | IMX2_WDT_STATUS_OPEN 0 |
| #define | IMX2_WDT_STATUS_STARTED 1 |
| #define | IMX2_WDT_EXPECT_CLOSE 2 |
Functions | |
| module_param (nowayout, bool, 0) | |
| MODULE_PARM_DESC (nowayout,"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")") | |
| module_param (timeout, uint, 0) | |
| MODULE_PARM_DESC (timeout,"Watchdog timeout in seconds (default="__MODULE_STRING(IMX2_WDT_DEFAULT_TIME)")") | |
| module_init (imx2_wdt_init) | |
| module_exit (imx2_wdt_exit) | |
| MODULE_AUTHOR ("Wolfram Sang") | |
| MODULE_DESCRIPTION ("Watchdog driver for IMX2 and later") | |
| MODULE_LICENSE ("GPL v2") | |
| MODULE_ALIAS_MISCDEV (WATCHDOG_MINOR) | |
| MODULE_ALIAS ("platform:"DRIVER_NAME) | |
| #define DRIVER_NAME "imx2-wdt" |
Definition at line 38 of file imx2_wdt.c.
Definition at line 53 of file imx2_wdt.c.
| #define IMX2_WDT_EXPECT_CLOSE 2 |
Definition at line 59 of file imx2_wdt.c.
| #define IMX2_WDT_MAX_TIME 128 |
Definition at line 52 of file imx2_wdt.c.
| #define IMX2_WDT_SEQ1 0x5555 /* -> service sequence 1 */ |
Definition at line 46 of file imx2_wdt.c.
| #define IMX2_WDT_SEQ2 0xAAAA /* -> service sequence 2 */ |
Definition at line 47 of file imx2_wdt.c.
| #define IMX2_WDT_STATUS_OPEN 0 |
Definition at line 57 of file imx2_wdt.c.
| #define IMX2_WDT_STATUS_STARTED 1 |
Definition at line 58 of file imx2_wdt.c.
| #define IMX2_WDT_WCR 0x00 /* Control Register */ |
Definition at line 40 of file imx2_wdt.c.
| #define IMX2_WDT_WCR_WDE (1 << 2) /* -> Watchdog Enable */ |
Definition at line 43 of file imx2_wdt.c.
Definition at line 42 of file imx2_wdt.c.
| #define IMX2_WDT_WCR_WT (0xFF << 8) /* -> Watchdog Timeout Field */ |
Definition at line 41 of file imx2_wdt.c.
| #define IMX2_WDT_WRSR 0x04 /* Reset Status Register */ |
Definition at line 49 of file imx2_wdt.c.
Definition at line 50 of file imx2_wdt.c.
| #define IMX2_WDT_WSR 0x02 /* Service Register */ |
Definition at line 45 of file imx2_wdt.c.
Definition at line 55 of file imx2_wdt.c.
| MODULE_ALIAS | ( | "platform:" | DRIVER_NAME | ) |
| MODULE_ALIAS_MISCDEV | ( | WATCHDOG_MINOR | ) |
| MODULE_AUTHOR | ( | "Wolfram Sang" | ) |
| module_exit | ( | imx2_wdt_exit | ) |
| module_init | ( | imx2_wdt_init | ) |
| MODULE_LICENSE | ( | "GPL v2" | ) |
| module_param | ( | nowayout | , |
| bool | , | ||
| 0 | |||
| ) |
| MODULE_PARM_DESC | ( | nowayout | , |
| "Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")" | |||
| ) |
| MODULE_PARM_DESC | ( | timeout | , |
| "Watchdog timeout in seconds (default="__MODULE_STRING(IMX2_WDT_DEFAULT_TIME)")" | |||
| ) |
Definition at line 63 of file imx2_wdt.c.
Definition at line 62 of file imx2_wdt.c.
Definition at line 65 of file imx2_wdt.c.
| unsigned timeout = IMX2_WDT_DEFAULT_TIME |
Definition at line 64 of file imx2_wdt.c.
Definition at line 66 of file imx2_wdt.c.
1.8.2