summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2015-01-26 14:47:10 +0100
committerStefan Agner <stefan.agner@toradex.com>2015-01-26 14:48:53 +0100
commit5c9c1b41d2c9c7062b70adaaf899205e89c4ef84 (patch)
treea3afabc5300c9a773d83cf21634abe220bd84f95
parent5be987d971863123d5e2ae5514ae543656bb42d6 (diff)
tty: serial: fsl_lpuart: specify transmit FIFO size
Specify transmit FIFO size which might be different depending on LPUART instance. This makes sure uart_wait_until_sent in serial core getting called, which in turn waits and checks if the FIFO is really empty on shutdown by using the tx_empty callback. Without this functionality, the last several characters might not be transmitted when closing the serial port, e.g. using a simple echo redirected to a ttyLP device.
-rw-r--r--drivers/tty/serial/fsl_lpuart.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 316cbbdcd198..6c154747d23f 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1076,6 +1076,8 @@ static int lpuart_startup(struct uart_port *port)
sport->txfifo_size = 0x1 << (((temp >> UARTPFIFO_TXSIZE_OFF) &
UARTPFIFO_FIFOSIZE_MASK) + 1);
+ sport->port.fifosize = sport->txfifo_size;
+
sport->rxfifo_size = 0x1 << (((temp >> UARTPFIFO_RXSIZE_OFF) &
UARTPFIFO_FIFOSIZE_MASK) + 1);