summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2018-10-16 13:57:11 +0200
committerTom Rini <trini@konsulko.com>2018-10-22 09:18:49 -0400
commite1a8dfde5a1efa5158bd7740ef6cbb8abc12a27f (patch)
treea482b61ece210720b710ae20983832332abecf12
parent290097fe2736dd23bfb926658d188db533b59779 (diff)
downloadu-boot-e1a8dfde5a1efa5158bd7740ef6cbb8abc12a27f.tar.gz
u-boot-e1a8dfde5a1efa5158bd7740ef6cbb8abc12a27f.tar.xz
u-boot-e1a8dfde5a1efa5158bd7740ef6cbb8abc12a27f.zip
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. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--arch/arm/include/asm/arch-aspeed/wdt.h9
-rw-r--r--drivers/watchdog/ast_wdt.c1
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-aspeed/wdt.h b/arch/arm/include/asm/arch-aspeed/wdt.h
index 8d6f292c84..fb04d41d3c 100644
--- a/arch/arm/include/asm/arch-aspeed/wdt.h
+++ b/arch/arm/include/asm/arch-aspeed/wdt.h
@@ -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;
diff --git a/drivers/watchdog/ast_wdt.c b/drivers/watchdog/ast_wdt.c
index 477605e722..59afa21efa 100644
--- a/drivers/watchdog/ast_wdt.c
+++ b/drivers/watchdog/ast_wdt.c
@@ -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;
}