Thread (12 messages) flat view 12 messages, 3 authors, 2011-01-05
STALE5691d REVIEWED: 1 (0M)

Revision v1 of 2 in this series; 1 review trailer.

Revisions (2)
  1. v1 [diff vs current]
  2. v1 current

[PATCH 2/7] ARM: PL011: Ensure error flags are clear at startup

From: Russell King - ARM Linux <hidden>
Date: 2011-01-03 10:08:38
Subsystem: the rest · Maintainer: Linus Torvalds

The error flags weren't being cleared upon UART startup, which
can cause problems when we add DMA support.  It's good practice
to ensure that these flags are cleared anyway, so let's do so.

This was part of a larger patch from Linus Walleij.

Acked-by: Linus Walleij <redacted>
Signed-off-by: Russell King <redacted>
---
 drivers/serial/amba-pl011.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index 2c07939..c77b3eb 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -424,6 +424,10 @@ static int pl011_startup(struct uart_port *port)
 	cr = UART01x_CR_UARTEN | UART011_CR_RXE | UART011_CR_TXE;
 	writew(cr, uap->port.membase + UART011_CR);
 
+	/* Clear pending error interrupts */
+	writew(UART011_OEIS | UART011_BEIS | UART011_PEIS | UART011_FEIS,
+	       uap->port.membase + UART011_ICR);
+
 	/*
 	 * initialise the old status of the modem signals
 	 */
-- 
1.6.2.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help