Skip to contentSkip to conversation

ARM: PL011: Ensure error flags are clear at startup

PATCH New Russell King - ARM Linux 1 participant 1 message Dec 22, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 ARM: PL011: Ensure error flags are clear at startup

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.

---
 drivers/serial/amba-pl011.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/serial/amba-pl011.c +4 -0
index 6ca7a44..6066b18 100644
@@ -423,6 +423,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
 	 */
Signature · 1 line
1.6.2.5