summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Lavra <francescolavra.fl@gmail.com>2015-07-25 08:25:18 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-22 14:49:16 -0700
commit6b73ab3608ed4d6ac548b3bcde45098f48320aea (patch)
treeeaa9c13c38e743afee445efb4efc5812f7617613
parentf8ecfcb2611766e3721124d49bf62335ada1cc93 (diff)
downloadlwn-6b73ab3608ed4d6ac548b3bcde45098f48320aea.tar.gz
lwn-6b73ab3608ed4d6ac548b3bcde45098f48320aea.zip
watchdog: sunxi: fix activation of system reset
commit 0919e4445190da18496d31aac08b90828a47d45f upstream. Commit f2147de33470 ("watchdog: sunxi: support parameterized compatible strings") introduced a regression in sunxi_wdt_start(), by which the system reset function of the watchdog is not enabled upon starting the watchdog. As a result, the system is not reset when the watchdog expires. Fix it. Fixes: f2147de33470 ("watchdog: sunxi: support parameterized compatible strings") Signed-off-by: Francesco Lavra <francescolavra.fl@gmail.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/watchdog/sunxi_wdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
index a29afb37c48c..47bd8a14d01f 100644
--- a/drivers/watchdog/sunxi_wdt.c
+++ b/drivers/watchdog/sunxi_wdt.c
@@ -184,7 +184,7 @@ static int sunxi_wdt_start(struct watchdog_device *wdt_dev)
/* Set system reset function */
reg = readl(wdt_base + regs->wdt_cfg);
reg &= ~(regs->wdt_reset_mask);
- reg |= ~(regs->wdt_reset_val);
+ reg |= regs->wdt_reset_val;
writel(reg, wdt_base + regs->wdt_cfg);
/* Enable watchdog */