linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: gregory.clement@bootlin.com
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
	Vladimir Zapolskiy <vz@mleia.com>,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	Sylvain Lemieux <slemieux.tyco@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] watchdog: pnx4008: readout watchdog state
Date: Mon, 15 Apr 2019 09:58:26 +0200	[thread overview]
Message-ID: <ed5f9278c1ca08662c8dae83f2ed60d1@bootlin.com> (raw)
In-Reply-To: <20190411191437.12173-1-alexandre.belloni@bootlin.com>

On 2019-04-11 21:14, Alexandre Belloni wrote:
> Readout the enabled state so it is possible to get the pre-userspace
> handler working. Also, avoid disabling the watchdog to ensure it 
> continues
> working and triggers if there is an issue later in the boot or if 
> userspace
> fails to start.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com>


> ---
>  drivers/watchdog/pnx4008_wdt.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/pnx4008_wdt.c 
> b/drivers/watchdog/pnx4008_wdt.c
> index 8e261799c84e..4ce0389d1442 100644
> --- a/drivers/watchdog/pnx4008_wdt.c
> +++ b/drivers/watchdog/pnx4008_wdt.c
> @@ -209,7 +209,8 @@ static int pnx4008_wdt_probe(struct platform_device 
> *pdev)
>  	watchdog_set_nowayout(&pnx4008_wdd, nowayout);
>  	watchdog_set_restart_priority(&pnx4008_wdd, 128);
> 
> -	pnx4008_wdt_stop(&pnx4008_wdd);	/* disable for now */
> +	if (readl(WDTIM_CTRL(wdt_base)) & COUNT_ENAB)
> +		set_bit(WDOG_HW_RUNNING, &pnx4008_wdd.status);
> 
>  	ret = watchdog_register_device(&pnx4008_wdd);
>  	if (ret < 0) {

      parent reply	other threads:[~2019-04-15  7:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 19:14 [PATCH v2] watchdog: pnx4008: readout watchdog state Alexandre Belloni
2019-04-11 19:32 ` Guenter Roeck
2019-04-15  7:58 ` gregory.clement [this message]

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=ed5f9278c1ca08662c8dae83f2ed60d1@bootlin.com \
    --to=gregory.clement@bootlin.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=slemieux.tyco@gmail.com \
    --cc=vz@mleia.com \
    --cc=wim@linux-watchdog.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).