MLK-23407 tty: serial: lpuart: disable flow control when wait transmit engine complete

When TX fifo has dirty data, user initialize the port and
wait transmit engine complete, it should disable flow control,
otherwise tx fifo never be empty.

Tested-by: Yang Tian <yang.tian@nxp.com>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
This commit is contained in:
Fugang Duan 2020-02-28 01:07:38 +08:00
parent cd3b40fc53
commit e735e17a19
1 changed files with 1 additions and 0 deletions

View File

@ -2228,6 +2228,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
uart_update_timeout(port, termios->c_cflag, baud);
/* wait transmit engin complete */
lpuart32_write(&sport->port, 0, UARTMODIR);
lpuart32_wait_bit_set(&sport->port, UARTSTAT, UARTSTAT_TC);
/* disable transmit and receive */