diff options
author | Benny Loenstrup Ammitzboell <benny@ammitzboell-consult.dk> | 2010-11-11 10:08:41 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2011-01-12 05:23:25 -0500 |
commit | 9c67bea419c384561eeb84bdf251d521a3234e45 (patch) | |
tree | 4ed8883d2836f1baf73c16758b7aa551ba134cbe | |
parent | df278dac2070e677cf22c30e1c78c5a753191375 (diff) |
watchdog: Add watchdog support for W83627DHG chip
The following adds watchdog support for the Winbond W83627DHG chip.
I have tested it on a PQ7-M102XL (Intel Atom) board.
Signed-off-by: Benny Lønstrup Ammitzbøll <benny@ammitzboell-consult.dk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r-- | drivers/watchdog/Kconfig | 9 | ||||
-rw-r--r-- | drivers/watchdog/w83627hf_wdt.c | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index a5ad77ef4266..8a3aa2f050c8 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
@@ -722,14 +722,15 @@ config SMSC37B787_WDT | |||
722 | Most people will say N. | 722 | Most people will say N. |
723 | 723 | ||
724 | config W83627HF_WDT | 724 | config W83627HF_WDT |
725 | tristate "W83627HF Watchdog Timer" | 725 | tristate "W83627HF/W83627DHG Watchdog Timer" |
726 | depends on X86 | 726 | depends on X86 |
727 | ---help--- | 727 | ---help--- |
728 | This is the driver for the hardware watchdog on the W83627HF chipset | 728 | This is the driver for the hardware watchdog on the W83627HF chipset |
729 | as used in Advantech PC-9578 and Tyan S2721-533 motherboards | 729 | as used in Advantech PC-9578 and Tyan S2721-533 motherboards |
730 | (and likely others). This watchdog simply watches your kernel to | 730 | (and likely others). The driver also supports the W83627DHG chip. |
731 | make sure it doesn't freeze, and if it does, it reboots your computer | 731 | This watchdog simply watches your kernel to make sure it doesn't |
732 | after a certain amount of time. | 732 | freeze, and if it does, it reboots your computer after a certain |
733 | amount of time. | ||
733 | 734 | ||
734 | To compile this driver as a module, choose M here: the | 735 | To compile this driver as a module, choose M here: the |
735 | module will be called w83627hf_wdt. | 736 | module will be called w83627hf_wdt. |
diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c index 0f5288df0091..48f2e0148bb4 100644 --- a/drivers/watchdog/w83627hf_wdt.c +++ b/drivers/watchdog/w83627hf_wdt.c | |||
@@ -42,7 +42,7 @@ | |||
42 | 42 | ||
43 | #include <asm/system.h> | 43 | #include <asm/system.h> |
44 | 44 | ||
45 | #define WATCHDOG_NAME "w83627hf/thf/hg WDT" | 45 | #define WATCHDOG_NAME "w83627hf/thf/hg/dhg WDT" |
46 | #define PFX WATCHDOG_NAME ": " | 46 | #define PFX WATCHDOG_NAME ": " |
47 | #define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */ | 47 | #define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */ |
48 | 48 | ||
@@ -89,7 +89,7 @@ static void w83627hf_select_wd_register(void) | |||
89 | c = ((inb_p(WDT_EFDR) & 0xf7) | 0x04); /* select WDT0 */ | 89 | c = ((inb_p(WDT_EFDR) & 0xf7) | 0x04); /* select WDT0 */ |
90 | outb_p(0x2b, WDT_EFER); | 90 | outb_p(0x2b, WDT_EFER); |
91 | outb_p(c, WDT_EFDR); /* set GPIO3 to WDT0 */ | 91 | outb_p(c, WDT_EFDR); /* set GPIO3 to WDT0 */ |
92 | } else if (c == 0x88) { /* W83627EHF */ | 92 | } else if (c == 0x88 || c == 0xa0) { /* W83627EHF / W83627DHG */ |
93 | outb_p(0x2d, WDT_EFER); /* select GPIO5 */ | 93 | outb_p(0x2d, WDT_EFER); /* select GPIO5 */ |
94 | c = inb_p(WDT_EFDR) & ~0x01; /* PIN77 -> WDT0# */ | 94 | c = inb_p(WDT_EFDR) & ~0x01; /* PIN77 -> WDT0# */ |
95 | outb_p(0x2d, WDT_EFER); | 95 | outb_p(0x2d, WDT_EFER); |
@@ -321,7 +321,7 @@ static int __init wdt_init(void) | |||
321 | { | 321 | { |
322 | int ret; | 322 | int ret; |
323 | 323 | ||
324 | printk(KERN_INFO "WDT driver for the Winbond(TM) W83627HF/THF/HG Super I/O chip initialising.\n"); | 324 | printk(KERN_INFO "WDT driver for the Winbond(TM) W83627HF/THF/HG/DHG Super I/O chip initialising.\n"); |
325 | 325 | ||
326 | if (wdt_set_heartbeat(timeout)) { | 326 | if (wdt_set_heartbeat(timeout)) { |
327 | wdt_set_heartbeat(WATCHDOG_TIMEOUT); | 327 | wdt_set_heartbeat(WATCHDOG_TIMEOUT); |