From: Russell King Date: Wed, 22 Dec 2010 17:09:08 +0000 (+0000) Subject: ARM: PL011: Ensure error flags are clear at startup X-Git-Tag: MMI-PSA29.97-13-9~21441^2~4^3~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5063e2c567ee569cccfc01ebf80c898cb4e6833a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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. Acked-by: Linus Walleij Signed-off-by: Russell King --- diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 2c07939be02c..c77b3eb5142d 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 */