serial: imx: remove the redundant code
authorHuang Shijie <b32955@freescale.com>
Wed, 21 May 2014 01:09:47 +0000 (09:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 May 2014 19:40:43 +0000 (12:40 -0700)
In the imx_startup(), we will reset the uart port which will reset all
the FIFOs, including the URXD.

So the code to clear the RX FIFO is redundant. Just remove it.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c

index 060ae97539234e20ef5cb4b052fb3a9ab23be23d..d373fe83da524ea45bf8d99668c172b9f132fce1 100644 (file)
@@ -1161,15 +1161,6 @@ static int imx_startup(struct uart_port *port)
                temp |= UCR2_IRTS;
        writel(temp, sport->port.membase + UCR2);
 
-       if (USE_IRDA(sport)) {
-               /* clear RX-FIFO */
-               int i = 64;
-               while ((--i > 0) &&
-                       (readl(sport->port.membase + URXD0) & URXD_CHARRDY)) {
-                       barrier();
-               }
-       }
-
        if (!is_imx1_uart(sport)) {
                temp = readl(sport->port.membase + UCR3);
                temp |= IMX21_UCR3_RXDMUXSEL | UCR3_ADNIMP;