Skip to content

Commit

Permalink
[PATCH] amba-pl010: clear error flags on rx error
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
buytenh authored and Linus Torvalds committed Dec 7, 2006
1 parent 9468f68 commit a4ed06a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/serial/amba-pl010.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ static void pl010_rx_chars(struct uart_port *port)
*/
rsr = readb(port->membase + UART01x_RSR) | UART_DUMMY_RSR_RX;
if (unlikely(rsr & UART01x_RSR_ANY)) {
writel(0, port->membase + UART01x_ECR);

if (rsr & UART01x_RSR_BE) {
rsr &= ~(UART01x_RSR_FE | UART01x_RSR_PE);
port->icount.brk++;
Expand Down

0 comments on commit a4ed06a

Please sign in to comment.