aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-07-15 08:04:39 -0400
committerVinod Koul <vinod.koul@intel.com>2013-08-05 00:02:26 -0400
commit3783cef876e0f24e93a11f1a76cc0b3fe7ea8d94 (patch)
tree372cc51611c816f4b5265fbb7674492183397d65 /drivers/dma
parent78f3c9d2e0e8c695c7379ed1ed53ea8eaf1da8e6 (diff)
dma: dw: allow shared interrupts
In the PC world is quite possible that devices are sharing the same interrupt line. The patch prepares dw_dmac driver to such cases. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/dw/core.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index 1ed9a9c9194a..6932645ca1f8 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -650,10 +650,13 @@ static void dw_dma_tasklet(unsigned long data)
650static irqreturn_t dw_dma_interrupt(int irq, void *dev_id) 650static irqreturn_t dw_dma_interrupt(int irq, void *dev_id)
651{ 651{
652 struct dw_dma *dw = dev_id; 652 struct dw_dma *dw = dev_id;
653 u32 status; 653 u32 status = dma_readl(dw, STATUS_INT);
654 654
655 dev_vdbg(dw->dma.dev, "%s: status=0x%x\n", __func__, 655 dev_vdbg(dw->dma.dev, "%s: status=0x%x\n", __func__, status);
656 dma_readl(dw, STATUS_INT)); 656
657 /* Check if we have any interrupt from the DMAC */
658 if (!status)
659 return IRQ_NONE;
657 660
658 /* 661 /*
659 * Just disable the interrupts. We'll turn them back on in the 662 * Just disable the interrupts. We'll turn them back on in the
@@ -1566,8 +1569,8 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata)
1566 /* Disable BLOCK interrupts as well */ 1569 /* Disable BLOCK interrupts as well */
1567 channel_clear_bit(dw, MASK.BLOCK, dw->all_chan_mask); 1570 channel_clear_bit(dw, MASK.BLOCK, dw->all_chan_mask);
1568 1571
1569 err = devm_request_irq(chip->dev, chip->irq, dw_dma_interrupt, 0, 1572 err = devm_request_irq(chip->dev, chip->irq, dw_dma_interrupt,
1570 "dw_dmac", dw); 1573 IRQF_SHARED, "dw_dmac", dw);
1571 if (err) 1574 if (err)
1572 return err; 1575 return err;
1573 1576