Commit 4d845a62 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Greg Kroah-Hartman

serial: imx: let irq handler return IRQ_NONE if no event was handled

This gives the irq core a chance to disable the serial interrupt in case
an event isn't cleared in the handler.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e881d3f3
...@@ -737,6 +737,7 @@ static irqreturn_t imx_int(int irq, void *dev_id) ...@@ -737,6 +737,7 @@ static irqreturn_t imx_int(int irq, void *dev_id)
struct imx_port *sport = dev_id; struct imx_port *sport = dev_id;
unsigned int sts; unsigned int sts;
unsigned int sts2; unsigned int sts2;
irqreturn_t ret = IRQ_NONE;
sts = readl(sport->port.membase + USR1); sts = readl(sport->port.membase + USR1);
sts2 = readl(sport->port.membase + USR2); sts2 = readl(sport->port.membase + USR2);
...@@ -746,26 +747,34 @@ static irqreturn_t imx_int(int irq, void *dev_id) ...@@ -746,26 +747,34 @@ static irqreturn_t imx_int(int irq, void *dev_id)
imx_dma_rxint(sport); imx_dma_rxint(sport);
else else
imx_rxint(irq, dev_id); imx_rxint(irq, dev_id);
ret = IRQ_HANDLED;
} }
if ((sts & USR1_TRDY && if ((sts & USR1_TRDY &&
readl(sport->port.membase + UCR1) & UCR1_TXMPTYEN) || readl(sport->port.membase + UCR1) & UCR1_TXMPTYEN) ||
(sts2 & USR2_TXDC && (sts2 & USR2_TXDC &&
readl(sport->port.membase + UCR4) & UCR4_TCEN)) readl(sport->port.membase + UCR4) & UCR4_TCEN)) {
imx_txint(irq, dev_id); imx_txint(irq, dev_id);
ret = IRQ_HANDLED;
}
if (sts & USR1_RTSD) if (sts & USR1_RTSD) {
imx_rtsint(irq, dev_id); imx_rtsint(irq, dev_id);
ret = IRQ_HANDLED;
}
if (sts & USR1_AWAKE) if (sts & USR1_AWAKE) {
writel(USR1_AWAKE, sport->port.membase + USR1); writel(USR1_AWAKE, sport->port.membase + USR1);
ret = IRQ_HANDLED;
}
if (sts2 & USR2_ORE) { if (sts2 & USR2_ORE) {
sport->port.icount.overrun++; sport->port.icount.overrun++;
writel(USR2_ORE, sport->port.membase + USR2); writel(USR2_ORE, sport->port.membase + USR2);
ret = IRQ_HANDLED;
} }
return IRQ_HANDLED; return ret;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment