Skip to content

Commit

Permalink
serial: imx: disable UCR4_OREN on shutdown
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
sre authored and gregkh committed May 25, 2018
1 parent 0fdf178 commit 339c7a8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/tty/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ static void imx_uart_shutdown(struct uart_port *port)
{
struct imx_port *sport = (struct imx_port *)port;
unsigned long flags;
u32 ucr1, ucr2;
u32 ucr1, ucr2, ucr4;

if (sport->dma_is_enabled) {
dmaengine_terminate_sync(sport->dma_chan_tx);
Expand Down Expand Up @@ -1452,6 +1452,10 @@ static void imx_uart_shutdown(struct uart_port *port)
ucr2 = imx_uart_readl(sport, UCR2);
ucr2 &= ~(UCR2_TXEN | UCR2_ATEN);
imx_uart_writel(sport, ucr2, UCR2);

ucr4 = imx_uart_readl(sport, UCR4);
ucr4 &= ~UCR4_OREN;
imx_uart_writel(sport, ucr4, UCR4);
spin_unlock_irqrestore(&sport->port.lock, flags);

/*
Expand Down

0 comments on commit 339c7a8

Please sign in to comment.