Skip to contentSkip to conversation

ARM: aspeed: witherspoon: Take UART1 out of reset

PATCH In review Joel Stanley 2 participants 2 messages May 1, 2017

Subsystems (3)
lore
Share & tools
lore

Joel Stanley

author maintainer
#0 lore raw

PATCH v2 1/1 ARM: aspeed: witherspoon: Take UART1 out of reset

This is required so the UART can be used before booting the host.

---
This is a minimal workaround for manufacturing. dev-4.10 will receive a proper fix.

v2:
- Make it compile

 arch/arm/mach-aspeed/aspeed.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/mach-aspeed/aspeed.c +10 -0
index 0717181cc890..0d1dded5d91b 100644
@@ -197,6 +197,8 @@ static void __init do_zaius_setup(void)
 
 static void __init do_witherspoon_setup(void)
 {
+	int reg;
+
 	do_common_setup();
 
 	/* Setup PNOR address mapping for 64M flash
@@ -216,6 +218,14 @@ static void __init do_witherspoon_setup(void)
 
 	/* Set SPI1 CE0 decoding window to 0x30000000 */
 	writel(0x68600000, AST_IO(AST_BASE_SPI | 0x30));
+
+        /* Disable default behavior of UART1 being held in reset by LPCRST#.
+         * By releasing UART1 from being controlled by LPC reset, it becomes
+         * immediately available regardless of the host being up.
+         */
+        reg = readl(AST_IO(AST_BASE_LPC | 0x98));
+        /* Clear "Enable UART1 reset source from LPC" */
+        writel(reg & ~BIT(4), AST_IO(AST_BASE_LPC | 0x98));
 }
 
 static void __init do_romulus_setup(void)
Signature · 1 line
2.11.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 4 lines · Joel Stanley

This is required so the UART can be used before booting the host.

Quoted 1 line
Quoted 8 lines

---
This is a minimal workaround for manufacturing. dev-4.10 will receive a proper fix.

v2:
 - Make it compile

Quoted 32 lines

 arch/arm/mach-aspeed/aspeed.c | 10 ++++++++++

 1 file changed, 10 insertions(+)
arch/arm/mach-aspeed/aspeed.c +0 -0
index 0717181cc890..0d1dded5d91b 100644
@@ -197,6 +197,8 @@ static void __init do_zaius_setup(void)


 static void __init do_witherspoon_setup(void)
 {

arch/arm/mach-aspeed/aspeed.c static void __init do_zaius_setup(void) · line 200

Quoted 1 line
arch/arm/mach-aspeed/aspeed.c +1 -0
+	int reg;

+

Quoted 1 line

  do_common_setup();

Quoted 1 line

  /* Setup PNOR address mapping for 64M flash

arch/arm/mach-aspeed/aspeed.c +0 -0
@@ -216,6 +218,14 @@ static void __init do_witherspoon_setup(void)

Quoted 2 lines

  /* Set SPI1 CE0 decoding window to 0x30000000 */ writel(0x68600000, AST_IO(AST_BASE_SPI | 0x30));

+
+        /* Disable default behavior of UART1 being held in reset by LPCRST#. +         * By releasing UART1 from being controlled by LPC reset, it becomes +         * immediately available regardless of the host being up. +         */
+        reg = readl(AST_IO(AST_BASE_LPC | 0x98));
+        /* Clear "Enable UART1 reset source from LPC" */
+        writel(reg & ~BIT(4), AST_IO(AST_BASE_LPC | 0x98));
 }

 static void __init do_romulus_setup(void)