Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

watchdog: sunxi: fix activation of system reset

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>
Cc: stable@vger.kernel.org

authored by

Francesco Lavra and committed by
Wim Van Sebroeck
0919e444 5724485b

+1 -1
+1 -1
drivers/watchdog/sunxi_wdt.c
··· 184 184 /* Set system reset function */ 185 185 reg = readl(wdt_base + regs->wdt_cfg); 186 186 reg &= ~(regs->wdt_reset_mask); 187 - reg |= ~(regs->wdt_reset_val); 187 + reg |= regs->wdt_reset_val; 188 188 writel(reg, wdt_base + regs->wdt_cfg); 189 189 190 190 /* Enable watchdog */