summaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorSascha Hauer <sascha@saschahauer.de>2008-04-17 08:43:14 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-17 16:18:20 +0100
commit0d3c3938ff9855d8996db4083efd62e86b8987eb (patch)
tree508644741e30c68866fc414b64bb0e0eca51af03 /drivers/serial
parent864eeed051b527c8081e2f85b51ba24823acaf71 (diff)
[ARM] 4995/1: <IMX UART>: Do not use URXD_CHARRDY for polling
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>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/imx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index c637ae21912..f7596641f12 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -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);