All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	linux-watchdog@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] watchdog: renesas_wdt: add grace period before rebooting
Date: Mon, 18 Jan 2021 08:03:37 -0800	[thread overview]
Message-ID: <3557f4a2-b401-c622-2dc4-282efdebcb11@roeck-us.net> (raw)
In-Reply-To: <20210118094558.36814-1-wsa+renesas@sang-engineering.com>

On 1/18/21 1:45 AM, Wolfram Sang wrote:
> arm64 does not have a grace period after calling reset handlers. It is
> rightfully assumed that watchdog drivers should wait because they know
> the time needed. Implement this for the Renesas watchdog driver.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Guenter Roeck <linux@oeck-us.net>

> ---
>  drivers/watchdog/renesas_wdt.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
> index d2b5074bca65..5791198960e6 100644
> --- a/drivers/watchdog/renesas_wdt.c
> +++ b/drivers/watchdog/renesas_wdt.c
> @@ -151,6 +151,9 @@ static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
>  
>  	rwdt_write(priv, RWTCSRA_TME, RWTCSRA);
>  
> +	/* wait 2 cycles, so watchdog will trigger */
> +	udelay(DIV_ROUND_UP(2 * 1000000, priv->clk_rate));
> +
>  	return 0;
>  }
>  
> 


      reply	other threads:[~2021-01-18 16:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18  9:45 [PATCH] watchdog: renesas_wdt: add grace period before rebooting Wolfram Sang
2021-01-18 16:03 ` Guenter Roeck [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=3557f4a2-b401-c622-2dc4-282efdebcb11@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /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.