提交 55e07177 编写于 作者: S Sandeep Tripathy 提交者: Wim Van Sebroeck

watchdog: sp805: ping fails to abort wdt reset

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: NSandeep Tripathy <tripathy@broadcom.com>
Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 29efefb9
...@@ -139,12 +139,11 @@ static int wdt_config(struct watchdog_device *wdd, bool ping) ...@@ -139,12 +139,11 @@ static int wdt_config(struct watchdog_device *wdd, bool ping)
writel_relaxed(UNLOCK, wdt->base + WDTLOCK); writel_relaxed(UNLOCK, wdt->base + WDTLOCK);
writel_relaxed(wdt->load_val, wdt->base + WDTLOAD); writel_relaxed(wdt->load_val, wdt->base + WDTLOAD);
writel_relaxed(INT_MASK, wdt->base + WDTINTCLR);
if (!ping) { if (!ping)
writel_relaxed(INT_MASK, wdt->base + WDTINTCLR);
writel_relaxed(INT_ENABLE | RESET_ENABLE, wdt->base + writel_relaxed(INT_ENABLE | RESET_ENABLE, wdt->base +
WDTCONTROL); WDTCONTROL);
}
writel_relaxed(LOCK, wdt->base + WDTLOCK); writel_relaxed(LOCK, wdt->base + WDTLOCK);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册