Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02a21b79 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Rafael J. Wysocki
Browse files

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 32146588
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -622,12 +622,17 @@ static void dw_dma_tasklet(unsigned long data)
static irqreturn_t dw_dma_interrupt(int irq, void *dev_id)
static irqreturn_t dw_dma_interrupt(int irq, void *dev_id)
{
{
	struct dw_dma *dw = dev_id;
	struct dw_dma *dw = dev_id;
	u32 status = dma_readl(dw, STATUS_INT);
	u32 status;


	/* Check if we have any interrupt from the DMAC which is not in use */
	if (!dw->in_use)
		return IRQ_NONE;

	status = dma_readl(dw, STATUS_INT);
	dev_vdbg(dw->dma.dev, "%s: status=0x%x\n", __func__, status);
	dev_vdbg(dw->dma.dev, "%s: status=0x%x\n", __func__, status);


	/* Check if we have any interrupt from the DMAC */
	/* Check if we have any interrupt from the DMAC */
	if (!status || !dw->in_use)
	if (!status)
		return IRQ_NONE;
		return IRQ_NONE;


	/*
	/*