summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/w83627hf_wdt.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2014-04-05 20:27:36 +0200
committerWim Van Sebroeck <wim@iguana.be>2014-06-10 21:46:07 +0200
commitbe281588d0bb21ccb07b1747939e0c919c2203fc (patch)
treec574c84b8b90d7a41c3468e7d56b69fa474d69d6 /drivers/watchdog/w83627hf_wdt.c
parentARM: mvebu: Add A375/A380 watchdog binding documentation (diff)
downloadlinux-be281588d0bb21ccb07b1747939e0c919c2203fc.tar.xz
linux-be281588d0bb21ccb07b1747939e0c919c2203fc.zip
watchdog: w83627hf_wdt: Add early_disable module parameter
Add early_disable module parameter to match functionality previously available in the w83697hf_wdt driver. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/w83627hf_wdt.c')
-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,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
+static int early_disable;
+module_param(early_disable, int, 0);
+MODULE_PARM_DESC(early_disable, "Disable watchdog at boot time (default=0)");
+
/*
* Kernel methods.
*/
@@ -208,9 +212,14 @@ static int w83627hf_init(struct watchdog_device *wdog, enum chips chip)
t = superio_inb(cr_wdt_timeout);
if (t != 0) {
- pr_info("Watchdog already running. Resetting timeout to %d sec\n",
- wdog->timeout);
- superio_outb(cr_wdt_timeout, wdog->timeout);
+ if (early_disable) {
+ pr_warn("Stopping previously enabled watchdog until userland kicks in\n");
+ superio_outb(cr_wdt_timeout, 0);
+ } else {
+ pr_info("Watchdog already running. Resetting timeout to %d sec\n",
+ wdog->timeout);
+ superio_outb(cr_wdt_timeout, wdog->timeout);
+ }
}
/* set second mode & disable keyboard turning off watchdog */