Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1311950
| From | Sandeep Tripathy <tripathy@broadcom.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/1] watchdog: sp805: ping fails to abort wdt reset |
| Date | 2016-01-19 07:10 +0100 |
| Message-ID | <qSxEl-3Dv-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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 t second *should* prevent wdt
reset. Currently if ping is done after t/2 sec 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>
---
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);
--
1.7.9.5
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/1] watchdog: sp805: ping fails to abort wdt reset Sandeep Tripathy <tripathy@broadcom.com> - 2016-01-19 07:10 +0100
Re: [PATCH 1/1] watchdog: sp805: ping fails to abort wdt reset Viresh Kumar <viresh.kumar@linaro.org> - 2016-01-19 08:00 +0100
Re: [PATCH 1/1] watchdog: sp805: ping fails to abort wdt reset Viresh Kumar <viresh.kumar@linaro.org> - 2016-01-19 08:20 +0100
Re: [PATCH 1/1] watchdog: sp805: ping fails to abort wdt reset Guenter Roeck <linux@roeck-us.net> - 2016-01-19 08:20 +0100
csiph-web