mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
3214658855
commit
02a21b79ac
1 changed files with 7 additions and 2 deletions
|
|
@ -622,12 +622,17 @@ static void dw_dma_tasklet(unsigned long data)
|
|||
static irqreturn_t dw_dma_interrupt(int irq, void *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);
|
||||
|
||||
/* Check if we have any interrupt from the DMAC */
|
||||
if (!status || !dw->in_use)
|
||||
if (!status)
|
||||
return IRQ_NONE;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue