diff options
-rw-r--r-- | drivers/tty/serial/fsl_lpuart.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 263cfaabe9e2..7bc17f21062a 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c | |||
@@ -342,8 +342,10 @@ static void lpuart_break_ctl(struct uart_port *port, int break_state) | |||
342 | static void lpuart_setup_watermark(struct lpuart_port *sport) | 342 | static void lpuart_setup_watermark(struct lpuart_port *sport) |
343 | { | 343 | { |
344 | unsigned char val, cr2; | 344 | unsigned char val, cr2; |
345 | unsigned char cr2_saved; | ||
345 | 346 | ||
346 | cr2 = readb(sport->port.membase + UARTCR2); | 347 | cr2 = readb(sport->port.membase + UARTCR2); |
348 | cr2_saved = cr2; | ||
347 | cr2 &= ~(UARTCR2_TIE | UARTCR2_TCIE | UARTCR2_TE | | 349 | cr2 &= ~(UARTCR2_TIE | UARTCR2_TCIE | UARTCR2_TE | |
348 | UARTCR2_RIE | UARTCR2_RE); | 350 | UARTCR2_RIE | UARTCR2_RE); |
349 | writeb(cr2, sport->port.membase + UARTCR2); | 351 | writeb(cr2, sport->port.membase + UARTCR2); |
@@ -366,6 +368,9 @@ static void lpuart_setup_watermark(struct lpuart_port *sport) | |||
366 | 368 | ||
367 | writeb(2, sport->port.membase + UARTTWFIFO); | 369 | writeb(2, sport->port.membase + UARTTWFIFO); |
368 | writeb(1, sport->port.membase + UARTRWFIFO); | 370 | writeb(1, sport->port.membase + UARTRWFIFO); |
371 | |||
372 | /* Restore cr2 */ | ||
373 | writeb(cr2_saved, sport->port.membase + UARTCR2); | ||
369 | } | 374 | } |
370 | 375 | ||
371 | static int lpuart_startup(struct uart_port *port) | 376 | static int lpuart_startup(struct uart_port *port) |