Skip to content

Commit

Permalink
dmaengine: qcom_hidma: disable/enable IRQs on pause/resume
Browse files Browse the repository at this point in the history
Once the channels are stopped, disable interrupts to make sure no new
HW interaction can happen.

Similarly, re-enable the interrupts only if we know that channel is
operational again.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Sinan Kaya authored and Vinod Koul committed Mar 27, 2017
1 parent c1ae3cf commit c3a4528
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/dma/qcom/hidma_ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,9 @@ int hidma_ll_enable(struct hidma_lldev *lldev)
lldev->trch_state = HIDMA_CH_ENABLED;
lldev->evch_state = HIDMA_CH_ENABLED;

/* enable irqs */
writel(ENABLE_IRQS, lldev->evca + HIDMA_EVCA_IRQ_EN_REG);

return 0;
}

Expand Down Expand Up @@ -596,6 +599,9 @@ int hidma_ll_disable(struct hidma_lldev *lldev)

lldev->trch_state = HIDMA_CH_SUSPENDED;
lldev->evch_state = HIDMA_CH_SUSPENDED;

/* disable interrupts */
writel(0, lldev->evca + HIDMA_EVCA_IRQ_EN_REG);
return 0;
}

Expand Down

0 comments on commit c3a4528

Please sign in to comment.