@@ -803,8 +803,18 @@ static int cdns_uart_startup(struct uart_port *port)
writel(readl(port->membase + CDNS_UART_ISR_OFFSET),
port->membase + CDNS_UART_ISR_OFFSET);
- /* Set the Interrupt Registers with desired interrupts */
- writel(CDNS_UART_IXR_TXEMPTY | CDNS_UART_IXR_PARITY |
+ /*
+ * Set the Interrupt Registers with desired interrupts. Do not
+ * enable parity error interrupt for the following reason:
+ * When parity error interrupt is enabled, each Rx parity error always
+ * results in 2 events. The first one being parity error interrupt
+ * and the second one with a proper Rx interrupt with the incoming data.
+ * Disabling parity error interrupt ensures better handling of parity
+ * error events. With this change, for a parity error case, we get a
+ * Rx interrupt with parity error set in ISR register and we still
+ * handle parity errors in the desired way.
+ */
+ writel(CDNS_UART_IXR_TXEMPTY |
CDNS_UART_IXR_FRAMING | CDNS_UART_IXR_OVERRUN |
CDNS_UART_IXR_RXTRIG | CDNS_UART_IXR_TOUT,
port->membase + CDNS_UART_IER_OFFSET);