MLK-21228-01 tty: serial: imx: clean up .imx_uart_stop_rx()
authorFugang Duan <fugang.duan@nxp.com>
Wed, 20 Mar 2019 09:50:55 +0000 (17:50 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
clean up .imx_uart_stop_rx() function, currently there have some
dummy setting introduced by commit de09e42393e5(MLK-11258 tty:
serial: imx: disable overrun interrupt during uart port shutdown)

Signed-off-by: Fugang Duan <B38611@freescale.com>
drivers/tty/serial/imx.c

index aa3a439..e566b13 100644 (file)
@@ -494,26 +494,20 @@ static void imx_uart_stop_rx(struct uart_port *port)
 
        ucr1 = imx_uart_readl(sport, UCR1);
        ucr2 = imx_uart_readl(sport, UCR2);
+       ucr4 = imx_uart_readl(sport, UCR4);
 
        if (sport->dma_is_enabled) {
                ucr1 &= ~(UCR1_RXDMAEN | UCR1_ATDMAEN);
        } else {
                ucr1 &= ~UCR1_RRDYEN;
                ucr2 &= ~UCR2_ATEN;
+               ucr4 &= ~UCR4_OREN;
        }
        imx_uart_writel(sport, ucr1, UCR1);
+       imx_uart_writel(sport, ucr4, UCR4);
 
        ucr2 &= ~UCR2_RXEN;
        imx_uart_writel(sport, ucr2, UCR2);
-
-       /* disable the Receiver Ready and overrun Interrupt */
-       ucr1 = imx_uart_readl(sport, UCR1);
-       imx_uart_writel(sport, ucr1 & ~UCR1_RRDYEN, UCR1);
-       ucr4 = imx_uart_readl(sport, UCR4);
-       imx_uart_writel(sport, ucr4 & ~UCR4_OREN, UCR4);
-
-       ucr2 = imx_uart_readl(sport, UCR2);
-       imx_uart_writel(sport, ucr2 & ~UCR2_RXEN, UCR2);
 }
 
 /* called with port.lock taken and irqs off */