summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorFabio Baltieri <fabio.baltieri@linaro.org>2012-12-19 14:41:56 +0100
committerFabio Baltieri <fabio.baltieri@linaro.org>2013-01-14 10:51:12 +0100
commit53d6d68f3c1792bce0144d8499435468e425a995 (patch)
tree0eae17de605454927d3e69dd78741dde8c838a97 /drivers/dma
parent7407048bec896268b50e3c43c1d012a4764dc210 (diff)
downloadlinux-3.10-53d6d68f3c1792bce0144d8499435468e425a995.tar.gz
linux-3.10-53d6d68f3c1792bce0144d8499435468e425a995.tar.bz2
linux-3.10-53d6d68f3c1792bce0144d8499435468e425a995.zip
dmaengine: set_dma40: ignore spurious interrupts
Some DMA channels may be used by other cores in the SoC. This patch modifies the dma interrupt handler to ignore interrupts from unknown channels. Cc: Rabin Vincent <rabin.vincent@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/ste_dma40.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 2ecefb7113b..a97bbd3a4a4 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -1677,13 +1677,22 @@ static irqreturn_t d40_handle_interrupt(int irq, void *data)
row = chan / BITS_PER_LONG;
idx = chan & (BITS_PER_LONG - 1);
- /* ACK interrupt */
- writel(1 << idx, base->virtbase + il[row].clr);
-
if (il[row].offset == D40_PHY_CHAN)
d40c = base->lookup_phy_chans[idx];
else
d40c = base->lookup_log_chans[il[row].offset + idx];
+
+ if (!d40c) {
+ /*
+ * No error because this can happen if something else
+ * in the system is using the channel.
+ */
+ continue;
+ }
+
+ /* ACK interrupt */
+ writel(1 << idx, base->virtbase + il[row].clr);
+
spin_lock(&d40c->lock);
if (!il[row].is_error)