aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/watchdog/w83627hf_wdt.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
index b1da0c18fd1a..7165704a3e33 100644
--- a/drivers/watchdog/w83627hf_wdt.c
+++ b/drivers/watchdog/w83627hf_wdt.c
@@ -64,6 +64,10 @@ MODULE_PARM_DESC(nowayout,
64 "Watchdog cannot be stopped once started (default=" 64 "Watchdog cannot be stopped once started (default="
65 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 65 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
66 66
67static int early_disable;
68module_param(early_disable, int, 0);
69MODULE_PARM_DESC(early_disable, "Disable watchdog at boot time (default=0)");
70
67/* 71/*
68 * Kernel methods. 72 * Kernel methods.
69 */ 73 */
@@ -208,9 +212,14 @@ static int w83627hf_init(struct watchdog_device *wdog, enum chips chip)
208 212
209 t = superio_inb(cr_wdt_timeout); 213 t = superio_inb(cr_wdt_timeout);
210 if (t != 0) { 214 if (t != 0) {
211 pr_info("Watchdog already running. Resetting timeout to %d sec\n", 215 if (early_disable) {
212 wdog->timeout); 216 pr_warn("Stopping previously enabled watchdog until userland kicks in\n");
213 superio_outb(cr_wdt_timeout, wdog->timeout); 217 superio_outb(cr_wdt_timeout, 0);
218 } else {
219 pr_info("Watchdog already running. Resetting timeout to %d sec\n",
220 wdog->timeout);
221 superio_outb(cr_wdt_timeout, wdog->timeout);
222 }
214 } 223 }
215 224
216 /* set second mode & disable keyboard turning off watchdog */ 225 /* set second mode & disable keyboard turning off watchdog */