summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiada Wang <jiada_wang@mentor.com>2014-12-09 12:11:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-10 01:23:59 +0300
commit6f026d6b7cb6e019b6352ed7fb71497c787fd6d7 (patch)
tree9e3f044676513231a4a2471a6279f1aeda822256
parentee5e7c1091a703c6a465d8145e9b55e09adb6f37 (diff)
downloadlinux-6f026d6b7cb6e019b6352ed7fb71497c787fd6d7.tar.xz
serial: imx: Enable UCR4_OREN in startup interface
Other than enable Receiver Overrun Interrupt Enable (UCR4_OREN) in start_tx interface, UCR4_OREN should be enabled before enable of Receiver. Signed-off-by: Jiada Wang <jiada_wang@mentor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/imx.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index d61b89e4a96e..79f485b99c3f 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -611,13 +611,6 @@ static void imx_start_tx(struct uart_port *port)
temp &= ~(UCR1_RRDYEN);
writel(temp, sport->port.membase + UCR1);
}
- /* Clear any pending ORE flag before enabling interrupt */
- temp = readl(sport->port.membase + USR2);
- writel(temp | USR2_ORE, sport->port.membase + USR2);
-
- temp = readl(sport->port.membase + UCR4);
- temp |= UCR4_OREN;
- writel(temp, sport->port.membase + UCR4);
if (!sport->dma_is_enabled) {
temp = readl(sport->port.membase + UCR1);
@@ -1178,6 +1171,14 @@ static int imx_startup(struct uart_port *port)
writel(temp, sport->port.membase + UCR1);
+ /* Clear any pending ORE flag before enabling interrupt */
+ temp = readl(sport->port.membase + USR2);
+ writel(temp | USR2_ORE, sport->port.membase + USR2);
+
+ temp = readl(sport->port.membase + UCR4);
+ temp |= UCR4_OREN;
+ writel(temp, sport->port.membase + UCR4);
+
temp = readl(sport->port.membase + UCR2);
temp |= (UCR2_RXEN | UCR2_TXEN);
if (!sport->have_rtscts)