aspeed: clear all asserting watchdog conditions
Subsystems (3)
PATCH 1/1 aspeed: clear all asserting watchdog conditions
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.
--- arch/arm/mach-aspeed/reset.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mach-aspeed/reset.c +6 -0
@@ -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 );
Signature · 1 line
1.8.2.2
Quoted 5 lines · Christopher Bostic
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.
I'm not immediately sure what the SCU3C write is about, but we can't do the others in u-boot as we need to continue to access the secondary flash during u-boot.
I was suggesting we clear the watchdog alt-boot overrides when we start the linux kernel so that the kernel chip selects match the hardware, while allowing the alternate u-boot to continue to read from the chip its started out of.
I'll work more urgently on drafting a more detailed proposal.
Quoted 29 lines
Signed-off-by Christopher Bostic <[email protected]>---
arch/arm/mach-aspeed/reset.c| 6 ++++++1 file changed, 6 insertions(+)arch/arm/mach-aspeed/reset.c +6
-0@@ -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);Signature · 1 line
1.8.2.2