Commit b2102eb3 authored by Lars Poeschel's avatar Lars Poeschel Committed by Wim Van Sebroeck

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: default avatarLars Poeschel <poeschel@lemonage.de>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 5e53c8ed
...@@ -208,6 +208,7 @@ nowayout: Watchdog cannot be stopped once started ...@@ -208,6 +208,7 @@ nowayout: Watchdog cannot be stopped once started
------------------------------------------------- -------------------------------------------------
omap_wdt: omap_wdt:
timer_margin: initial watchdog timeout (in seconds) timer_margin: initial watchdog timeout (in seconds)
early_enable: Watchdog is started on module insertion (default=0
nowayout: Watchdog cannot be stopped once started nowayout: Watchdog cannot be stopped once started
(default=kernel config parameter) (default=kernel config parameter)
------------------------------------------------- -------------------------------------------------
......
...@@ -55,6 +55,11 @@ MODULE_PARM_DESC(timer_margin, "initial watchdog timeout (in seconds)"); ...@@ -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) #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 omap_wdt_dev {
struct watchdog_device wdog; struct watchdog_device wdog;
void __iomem *base; /* physical */ void __iomem *base; /* physical */
...@@ -279,6 +284,9 @@ static int omap_wdt_probe(struct platform_device *pdev) ...@@ -279,6 +284,9 @@ static int omap_wdt_probe(struct platform_device *pdev)
pm_runtime_put_sync(wdev->dev); pm_runtime_put_sync(wdev->dev);
if (early_enable)
omap_wdt_start(&wdev->wdog);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment