projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5dcc89
)
tty: serial: fsl_lpuart: clear LPUART Status Register in lpuart32_shutdown()
author
Sherry Sun
<sherry.sun@nxp.com>
Fri, 25 Nov 2022 10:19:53 +0000
(18:19 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:37 +0000
(09:39 +0100)
[ Upstream commit
4029dfc034febb54f6dd8ea83568accc943bc088
]
The LPUART Status Register needs to be cleared when closing the uart
port to get a clean environment when reopening the uart.
Fixes: 380c966c093e ("tty: serial: fsl_lpuart: add 32-bit register interface support")
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Link:
https://lore.kernel.org/r/20221125101953.18753-4-sherry.sun@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/fsl_lpuart.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/fsl_lpuart.c
b/drivers/tty/serial/fsl_lpuart.c
index 24f9001d10242152e278b20f0c5855c03ed5a19b..ccfd6dd5fbf4ed4640ec5c84f29e2fa708f3f672 100644
(file)
--- a/
drivers/tty/serial/fsl_lpuart.c
+++ b/
drivers/tty/serial/fsl_lpuart.c
@@
-1807,6
+1807,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);