Skip to contentSkip to conversation

dma: mmp_tdma: disable irq when disabling dma channel

PATCH Superseded Qiao Zhou 3 participants 4 messages Jun 15, 2013 – Jun 21, 2013 dmaengine

lore
Share & tools
lore

Qiao Zhou

author
#0 lore raw

PATCH v2 1/1 dma: mmp_tdma: disable irq when disabling dma channel

V2 -> V1:
1, mask dma interrupt when disable DMA channel.
2, remove patch v1.

if the dma channel is disabled without interrupt masked, the interrupt status may still be set. next time when dma channel is enabled again, the old interrupt status may trigger the interrupt wrongly. we need to mask the interrupt when dma channel is disabled.

Qiao Zhou (1):
dma: mmp_tdma: disable irq when disabling dma channel

 drivers/dma/mmp_tdma.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
author
#1 lore raw

PATCH v2 1/1 dma: mmp_tdma: disable irq when disabling dma channel

mask dma irq when disabling dma channel, so that interrupt status will not be set and interrupt won't come again.

---
 drivers/dma/mmp_tdma.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/dma/mmp_tdma.c +4 -0
index 43d5a6c..9b93665 100644
@@ -154,6 +154,10 @@ static void mmp_tdma_disable_chan(struct mmp_tdma_chan *tdmac)
 {
 	writel(readl(tdmac->reg_base + TDCR) & ~TDCR_CHANEN,
 					tdmac->reg_base + TDCR);
+
+	/* disable irq */
+	writel(0, tdmac->reg_base + TDIMR);
+
 	tdmac->status = DMA_SUCCESS;
 }
 
Signature · 1 line
1.7.0.4
Applied
#3 lore raw
In reply to Qiao Zhou
Quoted 4 lines · Qiao Zhou

mask dma irq when disabling dma channel, so that interrupt status will not be set and interrupt won't come again.

Applied, thanks

--
~Vinod

Quoted 22 lines
---
 drivers/dma/mmp_tdma.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/dma/mmp_tdma.c +4 -0
index 43d5a6c..9b93665 100644
@@ -154,6 +154,10 @@ static void mmp_tdma_disable_chan(struct mmp_tdma_chan *tdmac)
 {
 	writel(readl(tdmac->reg_base + TDCR) & ~TDCR_CHANEN,
 					tdmac->reg_base + TDCR);
+
+	/* disable irq */
+	writel(0, tdmac->reg_base + TDIMR);
+
 	tdmac->status = DMA_SUCCESS;
 }
 
Signature · 1 line
1.7.0.4