All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: omap_wdt: removed disabling in the probe
@ 2012-10-29 11:11 Raffaele Recalcati
  2012-10-30  5:07   ` Lokesh Vutla
  0 siblings, 1 reply; 3+ messages in thread
From: Raffaele Recalcati @ 2012-10-29 11:11 UTC (permalink / raw)
  To: linux-omap, wim, linux-watchdog; +Cc: Raffaele Recalcati

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@gmail.com>
---
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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-30  5:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-29 11:11 [PATCH] watchdog: omap_wdt: removed disabling in the probe Raffaele Recalcati
2012-10-30  5:07 ` Lokesh Vutla
2012-10-30  5:07   ` Lokesh Vutla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.