All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux] arm: aspeed: zaius: Disable LPC reset for UART1
@ 2017-01-27 17:08 Xo Wang
  2017-01-27 17:41 ` Rick Altherr
  0 siblings, 1 reply; 3+ messages in thread
From: Xo Wang @ 2017-01-27 17:08 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.

Signed-off-by: Xo Wang <xow@google.com
---
 arch/arm/mach-aspeed/aspeed.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-aspeed/aspeed.c
index 4bd3680d742d..9f06191f1630 100644
--- a/arch/arm/mach-aspeed/aspeed.c
+++ b/arch/arm/mach-aspeed/aspeed.c
@@ -185,6 +185,10 @@ 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 */
+	reg = readl(AST_IO(AST_BASE_LPC | 0x98));
+	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] 3+ messages in thread

* Re: [PATCH linux] arm: aspeed: zaius: Disable LPC reset for UART1
  2017-01-27 17:08 [PATCH linux] arm: aspeed: zaius: Disable LPC reset for UART1 Xo Wang
@ 2017-01-27 17:41 ` Rick Altherr
  2017-01-27 23:24   ` Xo Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Rick Altherr @ 2017-01-27 17:41 UTC (permalink / raw)
  To: Xo Wang; +Cc: OpenBMC Maillist

[-- Attachment #1: Type: text/plain, Size: 1304 bytes --]

From the patch, I can't tell what your change is doing.  You've described
the problem but not the solution.

On Fri, Jan 27, 2017 at 9:08 AM, 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.
>
> Signed-off-by: Xo Wang <xow@google.com
> ---
>  arch/arm/mach-aspeed/aspeed.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-aspeed/aspeed.c
> index 4bd3680d742d..9f06191f1630 100644
> --- a/arch/arm/mach-aspeed/aspeed.c
> +++ b/arch/arm/mach-aspeed/aspeed.c
> @@ -185,6 +185,10 @@ 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 */
> +       reg = readl(AST_IO(AST_BASE_LPC | 0x98));
> +       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: 1990 bytes --]

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

* Re: [PATCH linux] arm: aspeed: zaius: Disable LPC reset for UART1
  2017-01-27 17:41 ` Rick Altherr
@ 2017-01-27 23:24   ` Xo Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Xo Wang @ 2017-01-27 23:24 UTC (permalink / raw)
  To: Rick Altherr; +Cc: OpenBMC Maillist

Heh, that's fair. I guess the code is an opaque block of bit twiddling.

Please take a look at v2.

On Fri, Jan 27, 2017 at 9:41 AM, Rick Altherr <raltherr@google.com> wrote:
> From the patch, I can't tell what your change is doing.  You've described
> the problem but not the solution.
>
> On Fri, Jan 27, 2017 at 9:08 AM, 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.
>>
>> Signed-off-by: Xo Wang <xow@google.com
>> ---
>>  arch/arm/mach-aspeed/aspeed.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-aspeed/aspeed.c
>> index 4bd3680d742d..9f06191f1630 100644
>> --- a/arch/arm/mach-aspeed/aspeed.c
>> +++ b/arch/arm/mach-aspeed/aspeed.c
>> @@ -185,6 +185,10 @@ 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 */
>> +       reg = readl(AST_IO(AST_BASE_LPC | 0x98));
>> +       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
>
>

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

end of thread, other threads:[~2017-01-27 23:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-27 17:08 [PATCH linux] arm: aspeed: zaius: Disable LPC reset for UART1 Xo Wang
2017-01-27 17:41 ` Rick Altherr
2017-01-27 23:24   ` Xo Wang

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.