diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2006-12-06 23:39:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:44 -0500 |
commit | a4ed06ad83acc3b7dafc018bc0b27469e787e27d (patch) | |
tree | 26ce210d81b77b40d08b96a5a7772f806eb43d89 /drivers | |
parent | 9468f687d95d1825fd2f2c2f74e1a59429ef25d3 (diff) |
[PATCH] amba-pl010: clear error flags on rx error
The pl010 primecell documentation specifies that an error indicated via RSR
should be cleared by a write to ECR. We didn't do this, which was causing
errors to be re-reported on every call to pl010_rx_chars().
Doing a write to ECR once we detect an error appears to prevent the ep93xx
console UART driver from going into a mode where it reports "ttyAM0: X
input overrun(s)" every couple of keystrokes.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/amba-pl010.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 4213fabc62bf..4d3626ef4643 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c | |||
@@ -129,6 +129,8 @@ static void pl010_rx_chars(struct uart_port *port) | |||
129 | */ | 129 | */ |
130 | rsr = readb(port->membase + UART01x_RSR) | UART_DUMMY_RSR_RX; | 130 | rsr = readb(port->membase + UART01x_RSR) | UART_DUMMY_RSR_RX; |
131 | if (unlikely(rsr & UART01x_RSR_ANY)) { | 131 | if (unlikely(rsr & UART01x_RSR_ANY)) { |
132 | writel(0, port->membase + UART01x_ECR); | ||
133 | |||
132 | if (rsr & UART01x_RSR_BE) { | 134 | if (rsr & UART01x_RSR_BE) { |
133 | rsr &= ~(UART01x_RSR_FE | UART01x_RSR_PE); | 135 | rsr &= ~(UART01x_RSR_FE | UART01x_RSR_PE); |
134 | port->icount.brk++; | 136 | port->icount.brk++; |