serial: fsl_lpuart: specify transmit FIFO size for 32-bit variant

This change “serial: fsl_lpuart: specify transmit FIFO size for 32-bit variant” in Linux kernel is authored by Atsushi Nemoto <atsushi.nemoto [at] sord.co.jp> on Mon Jan 21 17:36:21 2019 +0900.

serial: fsl_lpuart: specify transmit FIFO size for 32-bit variant

The commit 4e8f24593709 ("tty: serial: fsl_lpuart: specify transmit
FIFO size") fixed lpuart_startup only.
Fix lpuart32_startup too.

Signed-off-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit b0b2735.

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/tty/serial/fsl_lpuart.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 241a48e..2389986 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1334,6 +1334,8 @@ static int lpuart32_startup(struct uart_port *port)
 	sport->txfifo_size = 0x1 << (((temp >> UARTFIFO_TXSIZE_OFF) &
 		UARTFIFO_FIFOSIZE_MASK) - 1);
 
+	sport->port.fifosize = sport->txfifo_size;
+
 	sport->rxfifo_size = 0x1 << (((temp >> UARTFIFO_RXSIZE_OFF) &
 		UARTFIFO_FIFOSIZE_MASK) - 1);
 

The commit for this change in Linux stable tree is b0b2735 (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *