All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] serial: 8250: Use UART_LCR_WLEN8 instead of literal
@ 2022-06-13  7:57 Ilpo Järvinen
  2022-06-13  7:57 ` [PATCH 2/2] serial: 8250_pericom: Use UART_LCR_DLAB Ilpo Järvinen
  2022-06-13  8:28 ` [PATCH 1/2] serial: 8250: Use UART_LCR_WLEN8 instead of literal Jiri Slaby
  0 siblings, 2 replies; 4+ messages in thread
From: Ilpo Järvinen @ 2022-06-13  7:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, linux-serial, linux-kernel
  Cc: Ilpo Järvinen

Use UART_LCR_WLEN8 instead of literal 0x03 in size_fifo().

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
 drivers/tty/serial/8250/8250_port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 953b0fadfd4c..8365c7ad3576 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -843,7 +843,7 @@ static int size_fifo(struct uart_8250_port *up)
 	serial_out(up, UART_LCR, UART_LCR_CONF_MODE_A);
 	old_dl = serial_dl_read(up);
 	serial_dl_write(up, 0x0001);
-	serial_out(up, UART_LCR, 0x03);
+	serial_out(up, UART_LCR, UART_LCR_WLEN8);
 	for (count = 0; count < 256; count++)
 		serial_out(up, UART_TX, count);
 	mdelay(20);/* FIXME - schedule_timeout */
-- 
2.30.2


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

* [PATCH 2/2] serial: 8250_pericom: Use UART_LCR_DLAB
  2022-06-13  7:57 [PATCH 1/2] serial: 8250: Use UART_LCR_WLEN8 instead of literal Ilpo Järvinen
@ 2022-06-13  7:57 ` Ilpo Järvinen
  2022-06-13  8:28   ` Jiri Slaby
  2022-06-13  8:28 ` [PATCH 1/2] serial: 8250: Use UART_LCR_WLEN8 instead of literal Jiri Slaby
  1 sibling, 1 reply; 4+ messages in thread
From: Ilpo Järvinen @ 2022-06-13  7:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, linux-serial, linux-kernel
  Cc: Ilpo Järvinen

Use UART_LCR_DLAB instead of literal.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
 drivers/tty/serial/8250/8250_pericom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_pericom.c b/drivers/tty/serial/8250/8250_pericom.c
index 95ff10f25d58..b8d5b7714a9d 100644
--- a/drivers/tty/serial/8250/8250_pericom.c
+++ b/drivers/tty/serial/8250/8250_pericom.c
@@ -73,7 +73,7 @@ static void pericom_do_set_divisor(struct uart_port *port, unsigned int baud,
 			struct uart_8250_port *up = up_to_u8250p(port);
 			int lcr = serial_port_in(port, UART_LCR);
 
-			serial_port_out(port, UART_LCR, lcr | 0x80);
+			serial_port_out(port, UART_LCR, lcr | UART_LCR_DLAB);
 			serial_dl_write(up, divisor);
 			serial_port_out(port, 2, 16 - scr);
 			serial_port_out(port, UART_LCR, lcr);
-- 
2.30.2


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

* Re: [PATCH 1/2] serial: 8250: Use UART_LCR_WLEN8 instead of literal
  2022-06-13  7:57 [PATCH 1/2] serial: 8250: Use UART_LCR_WLEN8 instead of literal Ilpo Järvinen
  2022-06-13  7:57 ` [PATCH 2/2] serial: 8250_pericom: Use UART_LCR_DLAB Ilpo Järvinen
@ 2022-06-13  8:28 ` Jiri Slaby
  1 sibling, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2022-06-13  8:28 UTC (permalink / raw)
  To: Ilpo Järvinen, Greg Kroah-Hartman, linux-serial, linux-kernel

On 13. 06. 22, 9:57, Ilpo Järvinen wrote:
> Use UART_LCR_WLEN8 instead of literal 0x03 in size_fifo().
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>

> ---
>   drivers/tty/serial/8250/8250_port.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
> index 953b0fadfd4c..8365c7ad3576 100644
> --- a/drivers/tty/serial/8250/8250_port.c
> +++ b/drivers/tty/serial/8250/8250_port.c
> @@ -843,7 +843,7 @@ static int size_fifo(struct uart_8250_port *up)
>   	serial_out(up, UART_LCR, UART_LCR_CONF_MODE_A);
>   	old_dl = serial_dl_read(up);
>   	serial_dl_write(up, 0x0001);
> -	serial_out(up, UART_LCR, 0x03);
> +	serial_out(up, UART_LCR, UART_LCR_WLEN8);
>   	for (count = 0; count < 256; count++)
>   		serial_out(up, UART_TX, count);
>   	mdelay(20);/* FIXME - schedule_timeout */


-- 
js
suse labs

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

* Re: [PATCH 2/2] serial: 8250_pericom: Use UART_LCR_DLAB
  2022-06-13  7:57 ` [PATCH 2/2] serial: 8250_pericom: Use UART_LCR_DLAB Ilpo Järvinen
@ 2022-06-13  8:28   ` Jiri Slaby
  0 siblings, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2022-06-13  8:28 UTC (permalink / raw)
  To: Ilpo Järvinen, Greg Kroah-Hartman, linux-serial, linux-kernel

On 13. 06. 22, 9:57, Ilpo Järvinen wrote:
> Use UART_LCR_DLAB instead of literal.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>

> ---
>   drivers/tty/serial/8250/8250_pericom.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_pericom.c b/drivers/tty/serial/8250/8250_pericom.c
> index 95ff10f25d58..b8d5b7714a9d 100644
> --- a/drivers/tty/serial/8250/8250_pericom.c
> +++ b/drivers/tty/serial/8250/8250_pericom.c
> @@ -73,7 +73,7 @@ static void pericom_do_set_divisor(struct uart_port *port, unsigned int baud,
>   			struct uart_8250_port *up = up_to_u8250p(port);
>   			int lcr = serial_port_in(port, UART_LCR);
>   
> -			serial_port_out(port, UART_LCR, lcr | 0x80);
> +			serial_port_out(port, UART_LCR, lcr | UART_LCR_DLAB);
>   			serial_dl_write(up, divisor);
>   			serial_port_out(port, 2, 16 - scr);
>   			serial_port_out(port, UART_LCR, lcr);


-- 
js
suse labs

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

end of thread, other threads:[~2022-06-13  8:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-13  7:57 [PATCH 1/2] serial: 8250: Use UART_LCR_WLEN8 instead of literal Ilpo Järvinen
2022-06-13  7:57 ` [PATCH 2/2] serial: 8250_pericom: Use UART_LCR_DLAB Ilpo Järvinen
2022-06-13  8:28   ` Jiri Slaby
2022-06-13  8:28 ` [PATCH 1/2] serial: 8250: Use UART_LCR_WLEN8 instead of literal Jiri Slaby

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.