Linux Kernel
3.7.1
|
#include <linux/module.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/init.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/uaccess.h>
#include <linux/io.h>
Go to the source code of this file.
Macros | |
#define | pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
#define | ESB_VERSION "0.05" |
#define | ESB_MODULE_NAME "i6300ESB timer" |
#define | ESB_DRIVER_NAME ESB_MODULE_NAME ", v" ESB_VERSION |
#define | ESB_CONFIG_REG 0x60 /* Config register */ |
#define | ESB_LOCK_REG 0x68 /* WDT lock register */ |
#define | ESB_TIMER1_REG (BASEADDR + 0x00)/* Timer1 value after each reset */ |
#define | ESB_TIMER2_REG (BASEADDR + 0x04)/* Timer2 value after each reset */ |
#define | ESB_GINTSR_REG (BASEADDR + 0x08)/* General Interrupt Status Register */ |
#define | ESB_RELOAD_REG (BASEADDR + 0x0c)/* Reload register */ |
#define | ESB_WDT_FUNC (0x01 << 2) /* Watchdog functionality */ |
#define | ESB_WDT_ENABLE (0x01 << 1) /* Enable WDT */ |
#define | ESB_WDT_LOCK (0x01 << 0) /* Lock (nowayout) */ |
#define | ESB_WDT_REBOOT (0x01 << 5) /* Enable reboot on timeout */ |
#define | ESB_WDT_FREQ (0x01 << 2) /* Decrement frequency */ |
#define | ESB_WDT_INTTYPE (0x03 << 0) /* Interrupt type on timer1 timeout */ |
#define | ESB_WDT_TIMEOUT (0x01 << 9) /* Watchdog timed out */ |
#define | ESB_WDT_RELOAD (0x01 << 8) /* prevent timeout */ |
#define | ESB_UNLOCK1 0x80 /* Step 1 to unlock reset registers */ |
#define | ESB_UNLOCK2 0x86 /* Step 2 to unlock reset registers */ |
#define | WATCHDOG_HEARTBEAT 30 |
Functions | |
module_param (heartbeat, int, 0) | |
MODULE_PARM_DESC (heartbeat,"Watchdog heartbeat in seconds. (1<heartbeat<2046, default="__MODULE_STRING(WATCHDOG_HEARTBEAT)")") | |
module_param (nowayout, bool, 0) | |
MODULE_PARM_DESC (nowayout,"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")") | |
MODULE_DEVICE_TABLE (pci, esb_pci_tbl) | |
module_pci_driver (esb_driver) | |
MODULE_AUTHOR ("Ross Biro and David Härdeman") | |
MODULE_DESCRIPTION ("Watchdog driver for Intel 6300ESB chipsets") | |
MODULE_LICENSE ("GPL") | |
MODULE_ALIAS_MISCDEV (WATCHDOG_MINOR) | |
#define ESB_CONFIG_REG 0x60 /* Config register */ |
Definition at line 51 of file i6300esb.c.
#define ESB_DRIVER_NAME ESB_MODULE_NAME ", v" ESB_VERSION |
Definition at line 48 of file i6300esb.c.
#define ESB_GINTSR_REG (BASEADDR + 0x08)/* General Interrupt Status Register */ |
Definition at line 57 of file i6300esb.c.
#define ESB_LOCK_REG 0x68 /* WDT lock register */ |
Definition at line 52 of file i6300esb.c.
#define ESB_MODULE_NAME "i6300ESB timer" |
Definition at line 47 of file i6300esb.c.
#define ESB_RELOAD_REG (BASEADDR + 0x0c)/* Reload register */ |
Definition at line 58 of file i6300esb.c.
#define ESB_TIMER1_REG (BASEADDR + 0x00)/* Timer1 value after each reset */ |
Definition at line 55 of file i6300esb.c.
#define ESB_TIMER2_REG (BASEADDR + 0x04)/* Timer2 value after each reset */ |
Definition at line 56 of file i6300esb.c.
#define ESB_UNLOCK1 0x80 /* Step 1 to unlock reset registers */ |
Definition at line 75 of file i6300esb.c.
#define ESB_UNLOCK2 0x86 /* Step 2 to unlock reset registers */ |
Definition at line 76 of file i6300esb.c.
#define ESB_VERSION "0.05" |
Definition at line 46 of file i6300esb.c.
#define ESB_WDT_ENABLE (0x01 << 1) /* Enable WDT */ |
Definition at line 62 of file i6300esb.c.
#define ESB_WDT_FREQ (0x01 << 2) /* Decrement frequency */ |
Definition at line 67 of file i6300esb.c.
#define ESB_WDT_FUNC (0x01 << 2) /* Watchdog functionality */ |
Definition at line 61 of file i6300esb.c.
#define ESB_WDT_INTTYPE (0x03 << 0) /* Interrupt type on timer1 timeout */ |
Definition at line 68 of file i6300esb.c.
#define ESB_WDT_LOCK (0x01 << 0) /* Lock (nowayout) */ |
Definition at line 63 of file i6300esb.c.
#define ESB_WDT_REBOOT (0x01 << 5) /* Enable reboot on timeout */ |
Definition at line 66 of file i6300esb.c.
#define ESB_WDT_RELOAD (0x01 << 8) /* prevent timeout */ |
Definition at line 72 of file i6300esb.c.
#define ESB_WDT_TIMEOUT (0x01 << 9) /* Watchdog timed out */ |
Definition at line 71 of file i6300esb.c.
Definition at line 30 of file i6300esb.c.
#define WATCHDOG_HEARTBEAT 30 |
Definition at line 91 of file i6300esb.c.
MODULE_ALIAS_MISCDEV | ( | WATCHDOG_MINOR | ) |
MODULE_DEVICE_TABLE | ( | pci | , |
esb_pci_tbl | |||
) |
MODULE_LICENSE | ( | "GPL" | ) |
module_param | ( | nowayout | , |
bool | , | ||
0 | |||
) |
MODULE_PARM_DESC | ( | heartbeat | , |
"Watchdog heartbeat in seconds. (1<heartbeat<2046, default="__MODULE_STRING(WATCHDOG_HEARTBEAT)")" | |||
) |
MODULE_PARM_DESC | ( | nowayout | , |
"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")" | |||
) |
module_pci_driver | ( | esb_driver | ) |