All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Joshua Scott <joshua.scott@alliedtelesis.co.nz>,
	linux-arm-kernel@lists.infradead.org,
	Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Joshua Scott <joshua.scott@alliedtelesis.co.nz>, stable@vger.kernel.org
Subject: Re: [PATCH v3] ARM: dts: armada-xp-98dx3236: Switch to armada-38x-uart serial node
Date: Thu, 27 Jun 2019 17:37:47 +0200	[thread overview]
Message-ID: <87sgrvghtg.fsf@FE-laptop> (raw)
In-Reply-To: <20190625221108.21455-1-joshua.scott@alliedtelesis.co.nz>

Joshua Scott <joshua.scott@alliedtelesis.co.nz> writes:

> 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>
> Tested-by: Andrew Lunn <andrew@lunn.ch>
> Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com>.
> Cc: stable@vger.kernel.org
> Fixes: 43e28ba87708 ("ARM: dts: Use armada-370-xp as a base for
> armada-xp-98dx3236")

Applied on mvebu/fixes

Thanks,

Gregory


>
> ---
> Changes in v3:
>
> Updated title, added tested-by, and Fixes tag
>
> Changes in v2:
>
> Andrew Lunn was able to test on a Marvell 370RD reference design, and
> the character loss issue did not occur.
>
> The fix has now been changed to only affect the following SOCs:
>  * 98DX323x
>  * 98DX3333
>  * 98DX4251
>
> v1 message:
>
> 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.
>
> Cheers,
> Joshua Scott
> ---
>  arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/armada-xp-98dx3236.dtsi b/arch/arm/boot/dts/armada-xp-98dx3236.dtsi
> index 59753470cd34..267d0c178e55 100644
> --- a/arch/arm/boot/dts/armada-xp-98dx3236.dtsi
> +++ b/arch/arm/boot/dts/armada-xp-98dx3236.dtsi
> @@ -336,3 +336,11 @@
>  	status = "disabled";
>  };
>  
> +&uart0 {
> +	compatible = "marvell,armada-38x-uart";
> +};
> +
> +&uart1 {
> +	compatible = "marvell,armada-38x-uart";
> +};
> +
> -- 
> 2.21.0
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

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

WARNING: multiple messages have this Message-ID (diff)
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Joshua Scott <joshua.scott@alliedtelesis.co.nz>,
	linux-arm-kernel@lists.infradead.org,
	Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Joshua Scott <joshua.scott@alliedtelesis.co.nz>, stable@vger.kernel.org
Subject: Re: [PATCH v3] ARM: dts: armada-xp-98dx3236: Switch to armada-38x-uart serial node
Date: Thu, 27 Jun 2019 17:37:47 +0200	[thread overview]
Message-ID: <87sgrvghtg.fsf@FE-laptop> (raw)
In-Reply-To: <20190625221108.21455-1-joshua.scott@alliedtelesis.co.nz>

Joshua Scott <joshua.scott@alliedtelesis.co.nz> writes:

> 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>
> Tested-by: Andrew Lunn <andrew@lunn.ch>
> Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com>.
> Cc: stable@vger.kernel.org
> Fixes: 43e28ba87708 ("ARM: dts: Use armada-370-xp as a base for
> armada-xp-98dx3236")

Applied on mvebu/fixes

Thanks,

Gregory


>
> ---
> Changes in v3:
>
> Updated title, added tested-by, and Fixes tag
>
> Changes in v2:
>
> Andrew Lunn was able to test on a Marvell 370RD reference design, and
> the character loss issue did not occur.
>
> The fix has now been changed to only affect the following SOCs:
>  * 98DX323x
>  * 98DX3333
>  * 98DX4251
>
> v1 message:
>
> 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.
>
> Cheers,
> Joshua Scott
> ---
>  arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/armada-xp-98dx3236.dtsi b/arch/arm/boot/dts/armada-xp-98dx3236.dtsi
> index 59753470cd34..267d0c178e55 100644
> --- a/arch/arm/boot/dts/armada-xp-98dx3236.dtsi
> +++ b/arch/arm/boot/dts/armada-xp-98dx3236.dtsi
> @@ -336,3 +336,11 @@
>  	status = "disabled";
>  };
>  
> +&uart0 {
> +	compatible = "marvell,armada-38x-uart";
> +};
> +
> +&uart1 {
> +	compatible = "marvell,armada-38x-uart";
> +};
> +
> -- 
> 2.21.0
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

  reply	other threads:[~2019-06-27 15:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 22:11 [PATCH v3] ARM: dts: armada-xp-98dx3236: Switch to armada-38x-uart serial node Joshua Scott
2019-06-25 22:11 ` Joshua Scott
2019-06-27 15:37 ` Gregory CLEMENT [this message]
2019-06-27 15:37   ` Gregory CLEMENT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sgrvghtg.fsf@FE-laptop \
    --to=gregory.clement@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=jason@lakedaemon.net \
    --cc=joshua.scott@alliedtelesis.co.nz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.