From: Huang Shijie Date: Wed, 21 May 2014 01:09:47 +0000 (+0800) Subject: serial: imx: remove the redundant code X-Git-Tag: v5.15~17469^2~38^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8eccd0cd2106fbe0acc6bec3701e69e171353f25;p=platform%2Fkernel%2Flinux-starfive.git serial: imx: remove the redundant code 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 060ae97..d373fe8 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -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;