[PATCH] watchdog: omap_wdt: removed disabling in the probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In NOWAYOUT case it is better to have watchdog always enabled at boot,
in order not to leave the system in undefined state in case of userspace
failure.

Signed-off-by: Raffaele Recalcati <lamiaposta71@xxxxxxxxx>
---
Tested using http://arago-project.org/git/projects/linux-omap3.git
v2.6.37_OMAPPSP_04.02.00.07 commit.

 drivers/watchdog/omap_wdt.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 27ab8db..181b939 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -304,8 +304,16 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)
 	pm_runtime_enable(wdev->dev);
 	pm_runtime_get_sync(wdev->dev);
 
+#ifndef CONFIG_WATCHDOG_NOWAYOUT
 	omap_wdt_disable(wdev);
 	omap_wdt_adjust_timeout(timer_margin);
+#else
+	omap_wdt_adjust_timeout(timer_margin);
+	omap_wdt_disable(wdev);
+	omap_wdt_set_timeout(wdev);
+	omap_wdt_enable(wdev);
+	omap_wdt_ping(wdev);
+#endif
 
 	wdev->omap_wdt_miscdev.parent = &pdev->dev;
 	wdev->omap_wdt_miscdev.minor = WATCHDOG_MINOR;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux