linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dmaengine: qcom_hidma: disable/enable IRQs on pause/resume
@ 2017-03-25 23:04 Sinan Kaya
  2017-03-25 23:04 ` [PATCH 2/2] dmaengine: qcom_hidma: pause the channel on shutdown Sinan Kaya
  2017-03-27  5:14 ` [PATCH 1/2] dmaengine: qcom_hidma: disable/enable IRQs on pause/resume Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Sinan Kaya @ 2017-03-25 23:04 UTC (permalink / raw)
  To: dmaengine, timur
  Cc: Vinod Koul, linux-arm-msm, linux-kernel, Sinan Kaya, David Brown,
	Andy Gross, Dan Williams, linux-soc, linux-arm-kernel

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>
---
 drivers/dma/qcom/hidma_ll.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/dma/qcom/hidma_ll.c b/drivers/dma/qcom/hidma_ll.c
index 6645bdf..1530a66 100644
--- a/drivers/dma/qcom/hidma_ll.c
+++ b/drivers/dma/qcom/hidma_ll.c
@@ -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;
 }
 
@@ -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;
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-27  5:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-25 23:04 [PATCH 1/2] dmaengine: qcom_hidma: disable/enable IRQs on pause/resume Sinan Kaya
2017-03-25 23:04 ` [PATCH 2/2] dmaengine: qcom_hidma: pause the channel on shutdown Sinan Kaya
2017-03-27  5:14 ` [PATCH 1/2] dmaengine: qcom_hidma: disable/enable IRQs on pause/resume Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).