Skip to content

Commit 339c7a8

Browse files
sregregkh
authored andcommitted
serial: imx: disable UCR4_OREN on shutdown
UCR4_OREN is (depending on the configuration) enabled in startup, but is never disabled. Fix this by disabling it in shutdown. Reported-by: Nandor Han <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0fdf178 commit 339c7a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/tty/serial/imx.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ static void imx_uart_shutdown(struct uart_port *port)
14221422
{
14231423
struct imx_port *sport = (struct imx_port *)port;
14241424
unsigned long flags;
1425-
u32 ucr1, ucr2;
1425+
u32 ucr1, ucr2, ucr4;
14261426

14271427
if (sport->dma_is_enabled) {
14281428
dmaengine_terminate_sync(sport->dma_chan_tx);
@@ -1452,6 +1452,10 @@ static void imx_uart_shutdown(struct uart_port *port)
14521452
ucr2 = imx_uart_readl(sport, UCR2);
14531453
ucr2 &= ~(UCR2_TXEN | UCR2_ATEN);
14541454
imx_uart_writel(sport, ucr2, UCR2);
1455+
1456+
ucr4 = imx_uart_readl(sport, UCR4);
1457+
ucr4 &= ~UCR4_OREN;
1458+
imx_uart_writel(sport, ucr4, UCR4);
14551459
spin_unlock_irqrestore(&sport->port.lock, flags);
14561460

14571461
/*

0 commit comments

Comments
 (0)