Commit 4029dfc0 authored by Sherry Sun's avatar Sherry Sun Committed by Greg Kroah-Hartman
Browse files

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: 380c966c ("tty: serial: fsl_lpuart: add 32-bit register interface support")
Signed-off-by: default avatarSherry Sun <sherry.sun@nxp.com>
Link: https://lore.kernel.org/r/20221125101953.18753-4-sherry.sun@nxp.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1d4bd0e4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1799,6 +1799,10 @@ static void lpuart32_shutdown(struct uart_port *port)

	spin_lock_irqsave(&port->lock, flags);

	/* clear status */
	temp = lpuart32_read(&sport->port, UARTSTAT);
	lpuart32_write(&sport->port, temp, UARTSTAT);

	/* disable Rx/Tx DMA */
	temp = lpuart32_read(port, UARTBAUD);
	temp &= ~(UARTBAUD_TDMAE | UARTBAUD_RDMAE);