From: Guenter Roeck <linux@roeck-us.net>
To: Sandeep Tripathy <tripathy@broadcom.com>, wim@iguana.be
Cc: viresh.kumar@linaro.org, linux-watchdog@vger.kernel.org,
linux-kernel@vger.kernel.org,
bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH v2 1/1] watchdog: sp805: ping fails to abort wdt reset
Date: Tue, 19 Jan 2016 05:06:12 -0800 [thread overview]
Message-ID: <569E34C4.5020005@roeck-us.net> (raw)
In-Reply-To: <1453194889-27860-1-git-send-email-tripathy@broadcom.com>
On 01/19/2016 01:14 AM, Sandeep Tripathy wrote:
> sp805 wdt asserts interrupt for the first expiry and
> reloads the counter. If wdt interrupt is set and count
> reaches zero then wdt reset event is generated. To get
> wdt reset at 't' timeout the driver loads wdt counter
> with 't/2'. A ping before time 't' *should* prevent
> wdt reset. Currently if ping is done after 't/2' then
> wdt interrupt condition gets set. On the next countdown
> of loadval wdt reset event occurs eventhough wdt was
> reloaded before the set timeout 't'.
>
> This patch clears the interrupt condition on ping.
>
> Signed-off-by: Sandeep Tripathy <tripathy@broadcom.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/sp805_wdt.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
> index 01d8162..e7a715e 100644
> --- a/drivers/watchdog/sp805_wdt.c
> +++ b/drivers/watchdog/sp805_wdt.c
> @@ -139,12 +139,11 @@ static int wdt_config(struct watchdog_device *wdd, bool ping)
>
> writel_relaxed(UNLOCK, wdt->base + WDTLOCK);
> writel_relaxed(wdt->load_val, wdt->base + WDTLOAD);
> + writel_relaxed(INT_MASK, wdt->base + WDTINTCLR);
>
> - if (!ping) {
> - writel_relaxed(INT_MASK, wdt->base + WDTINTCLR);
> + if (!ping)
> writel_relaxed(INT_ENABLE | RESET_ENABLE, wdt->base +
> WDTCONTROL);
> - }
>
> writel_relaxed(LOCK, wdt->base + WDTLOCK);
>
>
prev parent reply other threads:[~2016-01-19 13:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 9:14 [PATCH v2 1/1] watchdog: sp805: ping fails to abort wdt reset Sandeep Tripathy
2016-01-19 9:18 ` Viresh Kumar
2016-01-19 13:06 ` 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=569E34C4.5020005@roeck-us.net \
--to=linux@roeck-us.net \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=tripathy@broadcom.com \
--cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox