[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231026105329.0ee9603563202bd2157a7d27@hugovil.com>
Date: Thu, 26 Oct 2023 10:53:29 -0400
From: Hugo Villeneuve <hugo@...ovil.com>
To: Théo Lebrun <theo.lebrun@...tlin.com>
Cc: Russell King <linux@...linux.org.uk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Gregory CLEMENT <gregory.clement@...tlin.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>,
Tawfik Bayouk <tawfik.bayouk@...ileye.com>
Subject: Re: [PATCH 6/6] tty: serial: amba-pl011: Parse bits option as 5, 6,
7 or 8 in _get_options
On Thu, 26 Oct 2023 12:41:23 +0200
Théo Lebrun <theo.lebrun@...tlin.com> wrote:
Hi,
I would change the commit title to better indicate that you add support
for bits 5 and 6, which was missing.
Maybe "Add support for 5 and 6 bits in..." ?
> pl011_console_get_options() gets called to retrieve currently configured
> options from the registers. Previously, LCRH_TX.WLEN was being parsed
It took me some time to understand your explanation :) Maybe change
to:
"Previously, only 7 or 8 bits were supported."
> as either 7 or 8 (fallback). Hardware supports values from 5 to 8
Add bits:
"5 to 8 bits..."
And indicate that this patch adds support for 5 and 6 bits.
> inclusive, which pl011_set_termios() exploits for example.
>
> Signed-off-by: Théo Lebrun <theo.lebrun@...tlin.com>
> ---
> drivers/tty/serial/amba-pl011.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index 5774d48c7f16..b2062e4cbbab 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -2384,10 +2384,7 @@ static void pl011_console_get_options(struct uart_amba_port *uap, int *baud,
> *parity = 'o';
> }
>
> - if ((lcr_h & 0x60) == UART01x_LCRH_WLEN_7)
> - *bits = 7;
> - else
> - *bits = 8;
> + *bits = FIELD_GET(0x60, lcr_h) + 5; /* from 5 to 8 inclusive */
Capital "F" -> "From...".
And add "bits" -> "From 5 to 8 bits..."
Hugo.
>
> ibrd = pl011_read(uap, REG_IBRD);
> fbrd = pl011_read(uap, REG_FBRD);
>
> --
> 2.41.0
>
Powered by blists - more mailing lists