aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-12-04 16:49:24 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-01-07 08:11:54 -0500
commit02a21b79acdb48b312f1351fd7cc728e66e81149 (patch)
tree3af9afe12232ea84f6fe7903854779c223243791
parent3214658855c01a0dd62f02feb2ce79846524c6a0 (diff)
dmaengine: dw: return immediately from IRQ when DMA isn't in use
There is no need to bother the hardware when all channels are idle. We have not to get any interrupts. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/dma/dw/core.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index 7067b6ddc1db..8b20930ade98 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -622,12 +622,17 @@ static void dw_dma_tasklet(unsigned long data)
622static irqreturn_t dw_dma_interrupt(int irq, void *dev_id) 622static irqreturn_t dw_dma_interrupt(int irq, void *dev_id)
623{ 623{
624 struct dw_dma *dw = dev_id; 624 struct dw_dma *dw = dev_id;
625 u32 status = dma_readl(dw, STATUS_INT); 625 u32 status;
626 626
627 /* Check if we have any interrupt from the DMAC which is not in use */
628 if (!dw->in_use)
629 return IRQ_NONE;
630
631 status = dma_readl(dw, STATUS_INT);
627 dev_vdbg(dw->dma.dev, "%s: status=0x%x\n", __func__, status); 632 dev_vdbg(dw->dma.dev, "%s: status=0x%x\n", __func__, status);
628 633
629 /* Check if we have any interrupt from the DMAC */ 634 /* Check if we have any interrupt from the DMAC */
630 if (!status || !dw->in_use) 635 if (!status)
631 return IRQ_NONE; 636 return IRQ_NONE;
632 637
633 /* 638 /*