summaryrefslogtreecommitdiff
path: root/drivers/serial/mxs-auart.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/mxs-auart.c')
-rw-r--r--drivers/serial/mxs-auart.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/drivers/serial/mxs-auart.c b/drivers/serial/mxs-auart.c
index 0eea46d71979..0791af105f72 100644
--- a/drivers/serial/mxs-auart.c
+++ b/drivers/serial/mxs-auart.c
@@ -514,7 +514,7 @@ static void mxs_auart_settermios(struct uart_port *u,
/* parity */
if (cflag & PARENB) {
- ctrl |= BM_UARTAPP_LINECTRL_PEN | BM_UARTAPP_LINECTRL_SPS;
+ ctrl |= BM_UARTAPP_LINECTRL_PEN;
if ((cflag & PARODD) == 0)
ctrl |= BM_UARTAPP_LINECTRL_EPS;
}
@@ -565,9 +565,33 @@ static irqreturn_t mxs_auart_irq_handle(int irq, void *context)
mxs_auart_tx_chars(s);
istat &= ~BM_UARTAPP_INTR_TXIS;
}
- if (istat & 0xFFFF)
+ /* modem status interrupt bits are undefined
+ after reset,and the hardware do not support
+ DSRMIS,DCDMIS and RIMIS bit,so we should ingore
+ them when they are pending. */
+ if (istat & (BM_UARTAPP_INTR_ABDIS
+ | BM_UARTAPP_INTR_OEIS
+ | BM_UARTAPP_INTR_BEIS
+ | BM_UARTAPP_INTR_PEIS
+ | BM_UARTAPP_INTR_FEIS
+ | BM_UARTAPP_INTR_RTIS
+ | BM_UARTAPP_INTR_TXIS
+ | BM_UARTAPP_INTR_RXIS
+ | BM_UARTAPP_INTR_CTSMIS)) {
dev_info(s->dev, "Unhandled status %x\n", istat);
- __raw_writel(istatus & 0xFFFF,
+ }
+ __raw_writel(istatus & (BM_UARTAPP_INTR_ABDIS
+ | BM_UARTAPP_INTR_OEIS
+ | BM_UARTAPP_INTR_BEIS
+ | BM_UARTAPP_INTR_PEIS
+ | BM_UARTAPP_INTR_FEIS
+ | BM_UARTAPP_INTR_RTIS
+ | BM_UARTAPP_INTR_TXIS
+ | BM_UARTAPP_INTR_RXIS
+ | BM_UARTAPP_INTR_DSRMIS
+ | BM_UARTAPP_INTR_DCDMIS
+ | BM_UARTAPP_INTR_CTSMIS
+ | BM_UARTAPP_INTR_RIMIS),
s->port.membase + HW_UARTAPP_INTR_CLR);
return IRQ_HANDLED;