All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH u-boot v2016.07] aspeed: clear all asserting watchdog conditions
@ 2017-09-27 21:27 Christopher Bostic
  2017-09-28  1:54 ` Milton Miller II
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Bostic @ 2017-09-27 21:27 UTC (permalink / raw)
  To: joel; +Cc: Christopher Bostic, openbmc

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@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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH u-boot v2016.07] aspeed: clear all asserting watchdog conditions
  2017-09-27 21:27 [PATCH u-boot v2016.07] aspeed: clear all asserting watchdog conditions Christopher Bostic
@ 2017-09-28  1:54 ` Milton Miller II
  0 siblings, 0 replies; 2+ messages in thread
From: Milton Miller II @ 2017-09-28  1:54 UTC (permalink / raw)
  To: Christopher Bostic; +Cc: joel, openbmc, Andrew Jeffery

On 09/27/2017 around 04:27PM in some time zone, Christopher Bostic wrote:
>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.

>
>Signed-off-by: Christopher Bostic <cbostic@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
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-28  1:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-27 21:27 [PATCH u-boot v2016.07] aspeed: clear all asserting watchdog conditions Christopher Bostic
2017-09-28  1:54 ` Milton Miller II

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.