All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	linux-watchdog@vger.kernel.org,
	"Wim Van Sebroeck" <wim@iguana.be>, "Felipe Balbi" <balbi@ti.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>,
	kernel@pengutronix.de,
	unknown author <unknown.author@example.com>
Subject: Re: [PATCH v2 6/4] watchdog: omap: allow to keep timer running at probe time
Date: Thu, 30 Apr 2015 21:52:19 -0700	[thread overview]
Message-ID: <55430683.2030102@roeck-us.net> (raw)
In-Reply-To: <1430332727-27491-2-git-send-email-u.kleine-koenig@pengutronix.de>

On 04/29/2015 11:38 AM, Uwe Kleine-König wrote:
> From: unknown author <unknown.author@example.com>
>
> On some machines it might be desirable to keep the watchdog that is
> started in the boot ROM running until userspace starts stroking it to be
> able to handle boot failures.
>
> To not introduce regressions for users not caring about the watchdog
> keep the previous behaviour of disabling the watchdog in the probe
> function unless a module parameter stop_at_probe is set to false.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Uwe,

would this address the problem you are tryng to solve ?

http://www.spinics.net/lists/arm-kernel/msg413658.html

Guenter

> ---
>   drivers/watchdog/omap_wdt.c | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
> index d7619dd7c1ca..5525afadf0ec 100644
> --- a/drivers/watchdog/omap_wdt.c
> +++ b/drivers/watchdog/omap_wdt.c
> @@ -53,6 +53,11 @@ static unsigned timer_margin;
>   module_param(timer_margin, uint, 0);
>   MODULE_PARM_DESC(timer_margin, "initial watchdog timeout (in seconds)");
>
> +static bool stop_at_probe = true;
> +module_param(stop_at_probe, bool, 0);
> +MODULE_PARM_DESC(stop_at_probe,
> +		 "Watchdog is stopped at probe time (default=true)");
> +
>   #define to_omap_wdt_dev(_wdog)	container_of(_wdog, struct omap_wdt_dev, wdog)
>
>   struct omap_wdt_dev {
> @@ -254,7 +259,8 @@ static int omap_wdt_probe(struct platform_device *pdev)
>   			wdev->wdog.bootstatus = WDIOF_CARDRESET;
>   	}
>
> -	omap_wdt_disable(wdev);
> +	if (stop_at_probe)
> +		omap_wdt_disable(wdev);
>
>   	ret = watchdog_register_device(&wdev->wdog);
>   	if (ret) {
> @@ -262,9 +268,9 @@ static int omap_wdt_probe(struct platform_device *pdev)
>   		return ret;
>   	}
>
> -	pr_info("OMAP Watchdog Timer Rev 0x%02x: initial timeout %d sec\n",
> +	pr_info("OMAP Watchdog Timer Rev 0x%02x: initial timeout %d sec, %sstopped\n",
>   		readl_relaxed(wdev->base + OMAP_WATCHDOG_REV) & 0xFF,
> -		wdev->wdog.timeout);
> +		wdev->wdog.timeout, stop_at_probe ? "" : "not ");
>
>   	pm_runtime_put_sync(wdev->dev);
>
>


  parent reply	other threads:[~2015-05-01  4:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27  9:22 [PATCH v2 0/4] watchdog: omap: several cleanups Uwe Kleine-König
2015-04-27  9:22 ` [PATCH v2 1/4] watchdog: omap: clearify device tree documentation Uwe Kleine-König
2015-04-27  9:22 ` [PATCH v2 2/4] watchdog: omap: use watchdog_init_timeout instead of open coding it Uwe Kleine-König
2015-04-27  9:23 ` [PATCH v2 3/4] watchdog: omap: put struct watchdog_device into driver data Uwe Kleine-König
2015-04-27  9:23 ` [PATCH v2 4/4] watchdog: omap: simplify assignment of bootstatus Uwe Kleine-König
2015-04-29 18:38 ` [PATCH v2 5/4] watchdog: omap: assert the counter being stopped before reprogramming Uwe Kleine-König
2015-05-01  4:53   ` Guenter Roeck
2015-04-29 18:38 ` [PATCH v2 6/4] watchdog: omap: allow to keep timer running at probe time Uwe Kleine-König
2015-04-29 18:47   ` Uwe Kleine-König
2015-05-01  4:52   ` Guenter Roeck [this message]
2015-05-05 13:53     ` Uwe Kleine-König
2015-05-08  7:35 ` [PATCH v2 0/4] watchdog: omap: several cleanups Uwe Kleine-König
2015-05-22 17:59   ` Uwe Kleine-König
2015-05-22 19:18     ` Guenter Roeck
2015-07-31  9:33       ` Uwe Kleine-König
2015-07-31 10:04         ` Guenter Roeck
2015-07-31 14:52           ` Uwe Kleine-König
2015-07-31 16:03             ` Guenter Roeck

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=55430683.2030102@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=balbi@ti.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=unknown.author@example.com \
    --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.