Skip to content

Commit

Permalink
serial: imx: Enable UCR4_OREN in startup interface
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiada Wang authored and Greg Kroah-Hartman committed Jan 9, 2015
1 parent ee5e7c1 commit 6f026d6
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions drivers/tty/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6f026d6

Please sign in to comment.