linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFT] serial: prevent armada-370/xp uart buffer loss
@ 2019-06-21  6:29 Joshua Scott
  2019-06-22 18:53 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Joshua Scott @ 2019-06-21  6:29 UTC (permalink / raw)
  To: linux-arm-kernel, Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth
  Cc: Joshua Scott

Switch to the "marvell,armada-38x-uart" driver variant to empty
the UART buffer before writing to the UART_LCR register.

Signed-off-by: Joshua Scott <joshua.scott@alliedtelesis.co.nz>
---

We have found that like the armada 38x, other Marvell SOCs can lose
characters when the UART_LCR register is written to without first
waiting for the buffer to empty.

We have observed this behaviour on the following Marvell switch SOCs:

 * 98DX323x
 * 98DX3333
 * 98DX4251

However, we do not currently have access to non-switch SOCs which share
the same parent device-tree.

The question we have is, should the fix be applied to the common
armada-370-xp device-tree, or should it be restricted to only affect the
SOCs listed above.

If anybody is able to check, we would like to find out if the issue
affects other armada-xp / armada-370 based SOCs.

The issue can be reproduced, if logging in using the serial port, with:
    resize && echo "hello world"

On affected devices, the first couple letters of "hello world" are
lost. On some SOCs this can be seen at 115200 baud, and on others
we have had to slow down to 9600 to see the issue.

Thank you,
Joshua Scott
---
 arch/arm/boot/dts/armada-370-xp.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index c15f5e92f97f..9a956d1611ab 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -130,7 +130,7 @@
 			};
 
 			uart0: serial@12000 {
-				compatible = "snps,dw-apb-uart";
+				compatible = "marvell,armada-38x-uart";
 				reg = <0x12000 0x100>;
 				reg-shift = <2>;
 				interrupts = <41>;
@@ -140,7 +140,7 @@
 			};
 
 			uart1: serial@12100 {
-				compatible = "snps,dw-apb-uart";
+				compatible = "marvell,armada-38x-uart";
 				reg = <0x12100 0x100>;
 				reg-shift = <2>;
 				interrupts = <42>;
-- 
2.21.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH/RFT] serial: prevent armada-370/xp uart buffer loss
  2019-06-21  6:29 [PATCH/RFT] serial: prevent armada-370/xp uart buffer loss Joshua Scott
@ 2019-06-22 18:53 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2019-06-22 18:53 UTC (permalink / raw)
  To: Joshua Scott
  Cc: Gregory Clement, Jason Cooper, linux-arm-kernel,
	Sebastian Hesselbarth

> The question we have is, should the fix be applied to the common
> armada-370-xp device-tree, or should it be restricted to only affect the
> SOCs listed above.
> 
> If anybody is able to check, we would like to find out if the issue
> affects other armada-xp / armada-370 based SOCs.
> 
> The issue can be reproduced, if logging in using the serial port, with:
>     resize && echo "hello world"

Hi Joshua

I tried this test out on a Marvell 370rd reference design. I tried
both 115200 and 9600 baud. I repeated the test maybe 10 times at each
speed. No dropped characters.

       Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-06-22 18:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-21  6:29 [PATCH/RFT] serial: prevent armada-370/xp uart buffer loss Joshua Scott
2019-06-22 18:53 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).