Skip to content

Commit 4029dfc

Browse files
SherrySun5gregkh
authored andcommitted
tty: serial: fsl_lpuart: clear LPUART Status Register in lpuart32_shutdown()
The LPUART Status Register needs to be cleared when closing the uart port to get a clean environment when reopening the uart. Fixes: 380c966 ("tty: serial: fsl_lpuart: add 32-bit register interface support") Signed-off-by: Sherry Sun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1d4bd0e commit 4029dfc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/tty/serial/fsl_lpuart.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,6 +1799,10 @@ static void lpuart32_shutdown(struct uart_port *port)
17991799

18001800
spin_lock_irqsave(&port->lock, flags);
18011801

1802+
/* clear status */
1803+
temp = lpuart32_read(&sport->port, UARTSTAT);
1804+
lpuart32_write(&sport->port, temp, UARTSTAT);
1805+
18021806
/* disable Rx/Tx DMA */
18031807
temp = lpuart32_read(port, UARTBAUD);
18041808
temp &= ~(UARTBAUD_TDMAE | UARTBAUD_RDMAE);

0 commit comments

Comments
 (0)