Skip to content

Commit

Permalink
[ARM] 4995/1: <IMX UART>: Do not use URXD_CHARRDY for polling
Browse files Browse the repository at this point in the history
Do not use the URXD_CHARRDY bit for polling for new characters. This works
on i.MX1, but on MX31 the datasheet states that this bit should not be
used for polling. On MX27 it is even worse, here we get a bus error when
we access the read FIFO when no character is present.
Instead, use USR2_RDR (receive data ready) bit.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Sascha Hauer authored and Russell King committed Apr 17, 2008
1 parent 864eeed commit 0d3c393
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,12 @@ static irqreturn_t imx_rxint(int irq, void *dev_id)

spin_lock_irqsave(&sport->port.lock,flags);

while ((rx = readl(sport->port.membase + URXD0)) & URXD_CHARRDY) {
while (readl(sport->port.membase + USR2) & USR2_RDR) {
flg = TTY_NORMAL;
sport->port.icount.rx++;

rx = readl(sport->port.membase + URXD0);

temp = readl(sport->port.membase + USR2);
if (temp & USR2_BRCD) {
writel(temp | USR2_BRCD, sport->port.membase + USR2);
Expand Down

0 comments on commit 0d3c393

Please sign in to comment.