arm: aspeed: zaius: Disable LPC reset for UART1
Subsystems (3)
PATCH v3 1/1 arm: aspeed: zaius: Disable LPC reset for UART1
Currently, UART1 on Zaius BMC is unusable until brought out of reset by powering the host on. In that default reset state, ttyS0 can still be opened and UART1 silently drops bytes, which is not obviously expected behavior.
Clear the LPC block control bit that enables LPCRST# as a reset source for UART1, making UART1 immediately useful in that it won't discard bytes.
--- arch/arm/mach-aspeed/aspeed.c | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/mach-aspeed/aspeed.c +8 -0
@@ -185,6 +185,14 @@ static void __init do_zaius_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_witherspoon_setup (void )
Signature · 1 line
2.11.0.483.g087da7b7c-goog
Joel Stanley
maintainerQuoted 10 lines · Xo Wang via openbmc
Currently, UART1 on Zaius BMC is unusable until brought out of reset by powering the host on. In that default reset state, ttyS0 can still be opened and UART1 silently drops bytes, which is not obviously expected behavior.
Clear the LPC block control bit that enables LPCRST# as a reset source for UART1, making UART1 immediately useful in that it won't discard bytes.
Signed-off-by Xo Wang <[email protected]>
Andrew, Rick, are you guys happy with this now? Can I get an ack or review tag?
Cheers,
Joel
Quoted 30 lines
--- arch/arm/mach-aspeed/aspeed.c | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm/mach-aspeed/aspeed.c +8
-1@@ -185,6 +185,14 @@ static void __init do_zaius_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_witherspoon_setup (void ) --2.11.0.483.g087da7b7c-goog
_______________________________________________
openbmc mailing list
[email protected]
https://lists.ozlabs.org/listinfo/openbmc
Quoted 26 lines · Xo Wang
Currently, UART1 on Zaius BMC is unusable until brought out of reset by powering the host on. In that default reset state, ttyS0 can still be opened and UART1 silently drops bytes, which is not obviously expected behavior.
Clear the LPC block control bit that enables LPCRST# as a reset source for UART1, making UART1 immediately useful in that it won't discard bytes.
Quoted 1 line
Signed-off-by Xo Wang <[email protected]>---
arch/arm/mach-aspeed/aspeed.c | 8 ++++++++1 file changed, 8 insertions(+)arch/arm/mach-aspeed/aspeed.c +0
-0@@ -185,6 +185,14 @@ static void __init do_zaius_setup(void)Quoted 2 lines
/* Set SPI1 CE0 decoding window to
0x30000000*/writel(0x68600000, AST_IO(AST_BASE_SPI | 0x30));+
Quoted 3 lines
arch/arm/mach-aspeed/aspeed.c +3
-0+/* 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.
arch/arm/mach-aspeed/aspeed.c static void __init do_zaius_setup(void) · line 192
Quoted 1 line
arch/arm/mach-aspeed/aspeed.c +1
-0+* */
Joel: Want to clean up the formatting here when you apply it? If so:
Quoted 6 lines
arch/arm/mach-aspeed/aspeed.c +1
-0+ reg =readl (AST_IO (AST_BASE_LPC |0x98 ));arch/arm/mach-aspeed/aspeed.c static void __init do_zaius_setup(void) · line 195
Quoted 2 lines
arch/arm/mach-aspeed/aspeed.c +2
-0+/* Clear "Enable UART1 reset source from LPC" */ +writel (reg & ~BIT (4 ),AST_IO (AST_BASE_LPC |0x98 ));}
static void__initdo_witherspoon_setup(void)
Joel Stanley
maintainerQuoted 24 lines · Andrew Jeffery
Quoted 23 lines · Xo Wang
Currently, UART1 on Zaius BMC is unusable until brought out of reset by powering the host on. In that default reset state, ttyS0 can still be opened and UART1 silently drops bytes, which is not obviously expected behavior.
Clear the LPC block control bit that enables LPCRST# as a reset source for UART1, making UART1 immediately useful in that it won't discard bytes.
Quoted 1 line
Signed-off-by Xo Wang <[email protected]>--- arch/arm/mach-aspeed/aspeed.c | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm/mach-aspeed/aspeed.c +0
-0@@ -185,6 +185,14 @@ static void __init do_zaius_setup(void)Quoted 2 lines
/* Set SPI1 CE0 decoding window to 0x30000000 */ writel(0x68600000, AST_IO(AST_BASE_SPI | 0x30));+
Quoted 8 lines
Quoted 4 lines
arch/arm/mach-aspeed/aspeed.c static void __init do_zaius_setup(void) · line 191
Quoted 3 lines
arch/arm/mach-aspeed/aspeed.c +3
-0+/* 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. + * */
Joel: Want to clean up the formatting here when you apply it? If so:
Reviewed-by Andrew Jeffery <[email protected]>
Thanks. I fixed the formatting of the comment when I applied. This is in dev-4.7 now.
Cheers,
Joel