[PATCH u-boot v2016.07] aspeed: clear all asserting watchdog conditions

Christopher Bostic cbostic at linux.vnet.ibm.com
Thu Sep 28 07:27:12 AEST 2017


Clear out all flagged watchdog conditions to allow the following
kernel load to complete successfully.  This will allow the kernel
to determine the next boot side instead of leaving it to u-boot.
This method of side switching has been suggested by Milton Miller
and Adirana Kobylak.

Signed-off-by: Christopher Bostic <cbostic at linux.vnet.ibm.com>
---
 arch/arm/mach-aspeed/reset.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/mach-aspeed/reset.c b/arch/arm/mach-aspeed/reset.c
index 1a44b3a..7d88d99 100644
--- a/arch/arm/mach-aspeed/reset.c
+++ b/arch/arm/mach-aspeed/reset.c
@@ -9,6 +9,12 @@
 
 void reset_cpu(ulong addr)
 {
+	/* Clear out all flagged watchdog events */
+	__raw_writel(0x1, AST_WDT1_BASE+0x14);
+	__raw_writel(0x1, AST_WDT2_BASE+0x14);
+	__raw_writel(0x1, AST_WDT3_BASE+0x14);
+	__raw_writel(__raw_readl(AST_SCU_BASE+0x3C) & 0x03, AST_SCU_BASE+0x3C);
+
 	__raw_writel(0x10 , AST_WDT1_BASE+0x04);
 	__raw_writel(0x4755, AST_WDT1_BASE+0x08);
 	__raw_writel(0x3, AST_WDT1_BASE+0x0c);
-- 
1.8.2.2



More information about the openbmc mailing list