Skip to contentSkip to conversation

watchdog: aspeed: restore default value of reset_mask

PATCH In review Cédric Le Goater 3 participants 3 messages Oct 16, 2018 – Oct 22, 2018

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

PATCH 1/1 watchdog: aspeed: restore default value of reset_mask

This is required for the current Linux kernel to reboot. It should also probably be fixed in Linux.

---
 arch/arm/include/asm/arch-aspeed/wdt.h | 9 +++++++++
 drivers/watchdog/ast_wdt.c             | 1 +
 2 files changed, 10 insertions(+)
arch/arm/include/asm/arch-aspeed/wdt.h +9 -0
index 8d6f292c8495..fb04d41d3cbf 100644
@@ -57,6 +57,15 @@
 #define WDT_RESET_SPI			(1 << 24)
 #define WDT_RESET_MISC			(1 << 25)
 
+#define WDT_RESET_DEFAULT						\
+	(WDT_RESET_ARM | WDT_RESET_COPROC | WDT_RESET_I2C |		\
+	 WDT_RESET_MAC1 | WDT_RESET_MAC2 | WDT_RESET_GCRT |		\
+	 WDT_RESET_USB20 | WDT_RESET_USB11_HOST | WDT_RESET_USB11_EHCI2 | \
+	 WDT_RESET_VIDEO | WDT_RESET_HAC | WDT_RESET_LPC |		\
+	 WDT_RESET_SDSDIO | WDT_RESET_MIC | WDT_RESET_CRT2C |		\
+	 WDT_RESET_PWM | WDT_RESET_PECI | WDT_RESET_JTAG |		\
+	 WDT_RESET_ADC | WDT_RESET_GPIO | WDT_RESET_MISC)
+
 #ifndef __ASSEMBLY__
 struct ast_wdt {
 	u32 counter_status;
drivers/watchdog/ast_wdt.c +1 -0
index 477605e7222d..59afa21efa4b 100644
@@ -50,6 +50,7 @@ static int ast_wdt_stop(struct udevice *dev)
 
 	clrbits_le32(&priv->regs->ctrl, WDT_CTRL_EN);
 
+	writel(WDT_RESET_DEFAULT, &priv->regs->reset_mask);
 	return 0;
 }
 
Signature · 1 line
2.17.2
#1 lore raw

PATCH 1/1 watchdog: aspeed: restore default value of reset_mask

Quoted 8 lines · Cédric Le Goater

This is required for the current Linux kernel to reboot. It should also probably be fixed in Linux.

---
 arch/arm/include/asm/arch-aspeed/wdt.h | 9 +++++++++
 drivers/watchdog/ast_wdt.c             | 1 +
 2 files changed, 10 insertions(+)
#2 lore raw
In reply to Cédric Le Goater
Quoted 5 lines · Cédric Le Goater

This is required for the current Linux kernel to reboot. It should also probably be fixed in Linux.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181022/5f6eaf92/attachment.sig>