All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raffaele Recalcati <lamiaposta71@gmail.com>
To: linux-omap@vger.kernel.org, wim@iguana.be,
	linux-watchdog@vger.kernel.org
Cc: Raffaele Recalcati <lamiaposta71@gmail.com>
Subject: [PATCH] watchdog: omap_wdt: removed disabling in the probe
Date: Mon, 29 Oct 2012 12:11:27 +0100	[thread overview]
Message-ID: <1351509087-6606-1-git-send-email-lamiaposta71@gmail.com> (raw)

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


             reply	other threads:[~2012-10-29 10:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29 11:11 Raffaele Recalcati [this message]
2012-10-30  5:07 ` [PATCH] watchdog: omap_wdt: removed disabling in the probe Lokesh Vutla
2012-10-30  5:07   ` Lokesh Vutla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1351509087-6606-1-git-send-email-lamiaposta71@gmail.com \
    --to=lamiaposta71@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.