* [PATCH linux v2] arm: aspeed: zaius: Disable LPC reset for UART1
@ 2017-01-27 23:23 Xo Wang
2017-01-27 23:32 ` Rick Altherr
0 siblings, 1 reply; 5+ messages in thread
From: Xo Wang @ 2017-01-27 23:23 UTC (permalink / raw)
To: openbmc
Currently, UART1 on Zaius BMC is unusable until brought out of reset by
powering the host on. In this 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.
Signed-off-by: Xo Wang <xow@google.com
---
arch/arm/mach-aspeed/aspeed.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-aspeed/aspeed.c
index 4bd3680d742d..fa99d8bde5e0 100644
--- a/arch/arm/mach-aspeed/aspeed.c
+++ b/arch/arm/mach-aspeed/aspeed.c
@@ -185,6 +185,13 @@ static void __init do_zaius_setup(void)
/* Set SPI1 CE0 decoding window to 0x30000000 */
writel(0x68600000, AST_IO(AST_BASE_SPI | 0x30));
+
+ /* Disable LPC reset for UART1, otherwise held in reset by LPCRST#,
+ * silently dropping bytes until released (usually by host power on)
+ * */
+ 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH linux v2] arm: aspeed: zaius: Disable LPC reset for UART1
2017-01-27 23:23 [PATCH linux v2] arm: aspeed: zaius: Disable LPC reset for UART1 Xo Wang
@ 2017-01-27 23:32 ` Rick Altherr
2017-01-28 8:00 ` Andrew Jeffery
0 siblings, 1 reply; 5+ messages in thread
From: Rick Altherr @ 2017-01-27 23:32 UTC (permalink / raw)
To: Xo Wang; +Cc: OpenBMC Maillist
[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]
I still don't follow. Is this changing it to drop bytes until the host
powers on? Is this change making it so the device won't open?
On Fri, Jan 27, 2017 at 3:23 PM, Xo Wang <xow@google.com> wrote:
> Currently, UART1 on Zaius BMC is unusable until brought out of reset by
> powering the host on. In this 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.
>
> Signed-off-by: Xo Wang <xow@google.com
> ---
> arch/arm/mach-aspeed/aspeed.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-aspeed/aspeed.c
> index 4bd3680d742d..fa99d8bde5e0 100644
> --- a/arch/arm/mach-aspeed/aspeed.c
> +++ b/arch/arm/mach-aspeed/aspeed.c
> @@ -185,6 +185,13 @@ static void __init do_zaius_setup(void)
>
> /* Set SPI1 CE0 decoding window to 0x30000000 */
> writel(0x68600000, AST_IO(AST_BASE_SPI | 0x30));
> +
> + /* Disable LPC reset for UART1, otherwise held in reset by LPCRST#,
> + * silently dropping bytes until released (usually by host power
> on)
> + * */
> + 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
> openbmc@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc
>
[-- Attachment #2: Type: text/html, Size: 2338 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH linux v2] arm: aspeed: zaius: Disable LPC reset for UART1
2017-01-27 23:32 ` Rick Altherr
@ 2017-01-28 8:00 ` Andrew Jeffery
2017-01-31 22:23 ` Xo Wang
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Jeffery @ 2017-01-28 8:00 UTC (permalink / raw)
To: openbmc
[-- Attachment #1: Type: text/plain, Size: 2409 bytes --]
On Fri, 2017-01-27 at 15:32 -0800, Rick Altherr wrote:
> I still don't follow. Is this changing it to drop bytes until the
> host powers on? Is this change making it so the device won't open?
I understand it to be the other way around:
In the existing configuration UART1 will drop bytes by being held in
reset until the host initialises the LPC bus (i.e. releases LPCRST#)
during boot.
Xo's change reconfigures the SoC so that UART1 reset state doesn't
depend on LPCRST# (i.e. the host initialising the LPC bus), so it is
immediately useful in that it won't discard bytes.
Xo?
Andrew
>
> > On Fri, Jan 27, 2017 at 3:23 PM, Xo Wang <xow@google.com> wrote:
> > Currently, UART1 on Zaius BMC is unusable until brought out of reset by
> > powering the host on. In this 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.
> >
> > Signed-off-by: Xo Wang <xow@google.com
> > ---
> > arch/arm/mach-aspeed/aspeed.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-aspeed/aspeed.c
> > index 4bd3680d742d..fa99d8bde5e0 100644
> > --- a/arch/arm/mach-aspeed/aspeed.c
> > +++ b/arch/arm/mach-aspeed/aspeed.c
> > @@ -185,6 +185,13 @@ static void __init do_zaius_setup(void)
> >
> > /* Set SPI1 CE0 decoding window to 0x30000000 */
> > writel(0x68600000, AST_IO(AST_BASE_SPI | 0x30));
> > +
> > + /* Disable LPC reset for UART1, otherwise held in reset by LPCRST#,
> > + * silently dropping bytes until released (usually by host power on)
> > + * */
> > + 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
> > openbmc@lists.ozlabs.org
> > https://lists.ozlabs.org/listinfo/openbmc
> >
>
> _______________________________________________
> openbmc mailing list
> openbmc@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH linux v2] arm: aspeed: zaius: Disable LPC reset for UART1
2017-01-28 8:00 ` Andrew Jeffery
@ 2017-01-31 22:23 ` Xo Wang
2017-01-31 22:24 ` Rick Altherr
0 siblings, 1 reply; 5+ messages in thread
From: Xo Wang @ 2017-01-31 22:23 UTC (permalink / raw)
To: Andrew Jeffery; +Cc: OpenBMC Maillist
On Sat, Jan 28, 2017 at 12:00 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> On Fri, 2017-01-27 at 15:32 -0800, Rick Altherr wrote:
>> I still don't follow. Is this changing it to drop bytes until the
>> host powers on? Is this change making it so the device won't open?
>
> I understand it to be the other way around:
>
> In the existing configuration UART1 will drop bytes by being held in
> reset until the host initialises the LPC bus (i.e. releases LPCRST#)
> during boot.
>
> Xo's change reconfigures the SoC so that UART1 reset state doesn't
> depend on LPCRST# (i.e. the host initialising the LPC bus), so it is
> immediately useful in that it won't discard bytes.
>
> Xo?
Yes, what Andrew said. It releases UART1 from being controlled by LPC
reset, so that it's available regardless of the host being up.
cheers
xo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH linux v2] arm: aspeed: zaius: Disable LPC reset for UART1
2017-01-31 22:23 ` Xo Wang
@ 2017-01-31 22:24 ` Rick Altherr
0 siblings, 0 replies; 5+ messages in thread
From: Rick Altherr @ 2017-01-31 22:24 UTC (permalink / raw)
To: Xo Wang; +Cc: Andrew Jeffery, OpenBMC Maillist
[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]
OK. I didn't get that from the commit message or comments as written.
On Tue, Jan 31, 2017 at 2:23 PM, Xo Wang via openbmc <
openbmc@lists.ozlabs.org> wrote:
> On Sat, Jan 28, 2017 at 12:00 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > On Fri, 2017-01-27 at 15:32 -0800, Rick Altherr wrote:
> >> I still don't follow. Is this changing it to drop bytes until the
> >> host powers on? Is this change making it so the device won't open?
> >
> > I understand it to be the other way around:
> >
> > In the existing configuration UART1 will drop bytes by being held in
> > reset until the host initialises the LPC bus (i.e. releases LPCRST#)
> > during boot.
> >
> > Xo's change reconfigures the SoC so that UART1 reset state doesn't
> > depend on LPCRST# (i.e. the host initialising the LPC bus), so it is
> > immediately useful in that it won't discard bytes.
> >
> > Xo?
>
> Yes, what Andrew said. It releases UART1 from being controlled by LPC
> reset, so that it's available regardless of the host being up.
>
> cheers
> xo
> _______________________________________________
> openbmc mailing list
> openbmc@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc
>
[-- Attachment #2: Type: text/html, Size: 1949 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-01-31 22:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-27 23:23 [PATCH linux v2] arm: aspeed: zaius: Disable LPC reset for UART1 Xo Wang
2017-01-27 23:32 ` Rick Altherr
2017-01-28 8:00 ` Andrew Jeffery
2017-01-31 22:23 ` Xo Wang
2017-01-31 22:24 ` Rick Altherr
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.