aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorP@Draig Brady <P@draigBrady.com>2005-08-17 03:06:07 -0400
committerWim Van Sebroeck <wim@iguana.be>2005-09-03 07:58:03 -0400
commit93642ecd463df30d032da8ac37c2676cee4ad876 (patch)
tree11b4a099cf920a8d5ef639a4b8a6a3b23f6a15c9 /drivers/char
parent94f1e9f316b10972b77a64344006c3bf8a4929b4 (diff)
[WATCHDOG] w83627hf_wdt.c-initialized_bios_bug
Attached is a small update to the w83627hf watchdog driver to initialise appropriately if it was already initialised in the BIOS. On tyan motherboards for e.g. you can init the watchdog to 4 mins, then when the driver is loaded it sets the watchdog to "seconds" mode, and then machine will reboot within 4 seconds. So this patch resets the timeout to the configured value if the watchdog is already running. Signed-off-by: P@draig Brady <P@draigBrady.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/watchdog/w83627hf_wdt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/char/watchdog/w83627hf_wdt.c b/drivers/char/watchdog/w83627hf_wdt.c
index 465e0fd0423d..b5d821015421 100644
--- a/drivers/char/watchdog/w83627hf_wdt.c
+++ b/drivers/char/watchdog/w83627hf_wdt.c
@@ -93,6 +93,12 @@ w83627hf_init(void)
93 93
94 w83627hf_select_wd_register(); 94 w83627hf_select_wd_register();
95 95
96 outb_p(0xF6, WDT_EFER); /* Select CRF6 */
97 t=inb_p(WDT_EFDR); /* read CRF6 */
98 if (t != 0) {
99 printk (KERN_INFO PFX "Watchdog already running. Resetting timeout to %d sec\n", timeout);
100 outb_p(timeout, WDT_EFDR); /* Write back to CRF6 */
101 }
96 outb_p(0xF5, WDT_EFER); /* Select CRF5 */ 102 outb_p(0xF5, WDT_EFER); /* Select CRF5 */
97 t=inb_p(WDT_EFDR); /* read CRF5 */ 103 t=inb_p(WDT_EFDR); /* read CRF5 */
98 t&=~0x0C; /* set second mode & disable keyboard turning off watchdog */ 104 t&=~0x0C; /* set second mode & disable keyboard turning off watchdog */