Skip to contentSkip to conversation

watchdog: sunxi: fix activation of system reset

PATCH In review Francesco Lavra 4 participants 4 messages Jul 25, 2015 – Aug 24, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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")
Cc stable at vger.kernel.org

---
Changes in v2:
- Added Reviewed-by, Fixes, and Cc tags
- Fixed commit message

---
 drivers/watchdog/sunxi_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/sunxi_wdt.c +1 -1
index a29afb3..47bd8a1 100644
@@ -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 */
Signature · 1 line
1.9.1
Acked-by on v2 1/1
#1 lore raw
Quoted 10 lines · Francesco Lavra

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")
Cc stable at vger.kernel.org

Thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150726/a7d3ce57/attachment.sig>
#2 lore raw

Hi,

Quoted 7 lines · Maxime Ripard
Quoted 6 lines · Francesco Lavra

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.

Quoted 6 lines
Quoted 4 lines
Fixes f2147de33470 ("watchdog: sunxi: support parameterized compatible strings")
Cc stable at vger.kernel.org

What tree should this go in through?
Guenter, are you still taking watchdog patches?

Thanks
ChenYu

maintainer
#3 lore raw
Quoted 16 lines · Chen-Yu Tsai

Hi,

Quoted 12 lines · Maxime Ripard
Quoted 10 lines · Francesco Lavra

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")
Cc stable at vger.kernel.org
Quoted 5 lines
Quoted 1 line

What tree should this go in through?
Guenter, are you still taking watchdog patches?

The patch is included in the pull request I sent to Wim last week [1].

Guenter

---
[1] http://www.spinics.net/lists/linux-watchdog/msg07219.html