summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorLars Poeschel <poeschel@lemonage.de>2015-06-25 12:21:51 +0200
committerWim Van Sebroeck <wim@iguana.be>2015-07-01 16:43:17 +0200
commitb2102eb36e7909c779e46f66595fda75aa219f4c (patch)
tree081e96cdd7fbac187a46a3ac25492a4a4ee2d9f0 /drivers/watchdog
parent5e53c8ed813d6100d2cebbf83f2192b201f70772 (diff)
downloadlinux-b2102eb36e7909c779e46f66595fda75aa219f4c.tar.bz2
watchdog: omap_wdt: early_enable module parameter
Add a early_enable module parameter to the omap_wdt that starts the watchdog on module insertion. The default value is 0 which does not start the watchdog - which also does not change the behavior if the parameter is not given. Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/omap_wdt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index ebea6e66fba9..de911c7e477c 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -55,6 +55,11 @@ MODULE_PARM_DESC(timer_margin, "initial watchdog timeout (in seconds)");
#define to_omap_wdt_dev(_wdog) container_of(_wdog, struct omap_wdt_dev, wdog)
+static bool early_enable;
+module_param(early_enable, bool, 0);
+MODULE_PARM_DESC(early_enable,
+ "Watchdog is started on module insertion (default=0)");
+
struct omap_wdt_dev {
struct watchdog_device wdog;
void __iomem *base; /* physical */
@@ -279,6 +284,9 @@ static int omap_wdt_probe(struct platform_device *pdev)
pm_runtime_put_sync(wdev->dev);
+ if (early_enable)
+ omap_wdt_start(&wdev->wdog);
+
return 0;
}