diff mbox

[v4] tty: serial: meson: allow baud-rates lower than 9600

Message ID bb0a70cc-6cc1-46d2-aa04-046a37c9f516@myway.de (mailing list archive)
State Not Applicable
Headers show

Commit Message

Thomas Rohloff Nov. 5, 2017, 4:29 a.m. UTC
Devices like DCF77 receivers need the baud-rate to be as low as 50.

I have tested this on a Meson GXL device with uart_A.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Thomas Rohloff <v10lator@myway.de>
---
 drivers/tty/serial/meson_uart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

 	port->read_status_mask = AML_UART_TX_FIFO_WERR;

Comments

Greg Kroah-Hartman Nov. 5, 2017, 2:12 p.m. UTC | #1
On Sun, Nov 05, 2017 at 05:29:30AM +0100, Thomas Rohloff wrote:
> Devices like DCF77 receivers need the baud-rate to be as low as 50.
> 
> I have tested this on a Meson GXL device with uart_A.
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jslaby@suse.com>
> Cc: Carlo Caione <carlo@caione.org>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: linux-amlogic@lists.infradead.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Thomas Rohloff <v10lator@myway.de>
> ---
> drivers/tty/serial/meson_uart.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/meson_uart.c
> b/drivers/tty/serial/meson_uart.c
> index 07c0f98be3ac..e281ce5d101d 100644
> --- a/drivers/tty/serial/meson_uart.c
> +++ b/drivers/tty/serial/meson_uart.c
> @@ -362,7 +362,7 @@ static void meson_uart_set_termios(struct uart_port
> *port,

This is line-wrapped and can not be applied :(

It's your email client, look at this setting:
	Content-Type: text/plain; charset=utf-8; format=flowed

format=flowed does not work for kernel patches, it corruptes and edits
them as it thinks this is just a conversation, not a machine-readable
format.

5th try?  :)

thanks,

greg k-h
Martin Blumenstingl Nov. 5, 2017, 3:02 p.m. UTC | #2
Hi Thomas,

thank you for this patch!

On Sun, Nov 5, 2017 at 3:12 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Sun, Nov 05, 2017 at 05:29:30AM +0100, Thomas Rohloff wrote:
>> Devices like DCF77 receivers need the baud-rate to be as low as 50.
>>
>> I have tested this on a Meson GXL device with uart_A.
>>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: Jiri Slaby <jslaby@suse.com>
>> Cc: Carlo Caione <carlo@caione.org>
>> Cc: Kevin Hilman <khilman@baylibre.com>
>> Cc: linux-amlogic@lists.infradead.org
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Thomas Rohloff <v10lator@myway.de>
>> ---
>> drivers/tty/serial/meson_uart.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/tty/serial/meson_uart.c
>> b/drivers/tty/serial/meson_uart.c
>> index 07c0f98be3ac..e281ce5d101d 100644
>> --- a/drivers/tty/serial/meson_uart.c
>> +++ b/drivers/tty/serial/meson_uart.c
>> @@ -362,7 +362,7 @@ static void meson_uart_set_termios(struct uart_port
>> *port,
>
> This is line-wrapped and can not be applied :(
>
> It's your email client, look at this setting:
>         Content-Type: text/plain; charset=utf-8; format=flowed
>
> format=flowed does not work for kernel patches, it corruptes and edits
> them as it thinks this is just a conversation, not a machine-readable
> format.
>
> 5th try?  :)
if you send a 5th version, please also include Neil's "Reviewed-by"
just below your Signed-off-by:
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

you can do this by running git commit --amend - this lets you edit the
existing commit message so you can append that


Regards,
Martin
Thomas Rohloff Nov. 5, 2017, 7:34 p.m. UTC | #3
Am Sonntag, 5. November 2017 15:12:06 CET schrieb Greg Kroah-Hartman:
> On Sun, Nov 05, 2017 at 05:29:30AM +0100, Thomas Rohloff wrote:
>> Devices like DCF77 receivers need the baud-rate to be as low as 50.
>> 
>> I have tested this on a Meson GXL device with uart_A.
>> 
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: Jiri Slaby <jslaby@suse.com>
>> Cc: Carlo Caione <carlo@caione.org> ...
>
> This is line-wrapped and can not be applied :(
>
> It's your email client, look at this setting:
> 	Content-Type: text/plain; charset=utf-8; format=flowed
>
> format=flowed does not work for kernel patches, it corruptes and edits
> them as it thinks this is just a conversation, not a machine-readable
> format.
>
> 5th try?  :)
>
> thanks,
>
> greg k-h

Thanks for explaining. I'll try a v5. :)
diff mbox

Patch

diff --git a/drivers/tty/serial/meson_uart.c 
b/drivers/tty/serial/meson_uart.c
index 07c0f98be3ac..e281ce5d101d 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -362,7 +362,7 @@  static void meson_uart_set_termios(struct uart_port 
*port,
 
 	writel(val, port->membase + AML_UART_CONTROL);
 
-	baud = uart_get_baud_rate(port, termios, old, 9600, 4000000);
+	baud = uart_get_baud_rate(port, termios, old, 50, 4000000);
 	meson_uart_change_speed(port, baud);