From bd515f5a7babfc1d8470637c49b3c9df87102160 Mon Sep 17 00:00:00 2001 From: Fugang Duan Date: Tue, 6 Jun 2017 15:14:42 +0800 Subject: [PATCH] MLK-15031-04 tty: serial: fsl_lpuart: wait baud rate stable After set the new baud rate, wait some time for the stable. Signed-off-by: Fugang Duan Reviewed-by: Robin Gong --- drivers/tty/serial/fsl_lpuart.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 211155b3ad25..59af53f8c714 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -1751,6 +1752,9 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios, lpuart32_write(ctrl, sport->port.membase + UARTCTRL); spin_unlock_irqrestore(&sport->port.lock, flags); + + /* wait baud rate stable */ + usleep_range(1000, 2000); } static const char *lpuart_type(struct uart_port *port) -- 2.17.1