aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@nokia.com>2010-11-24 13:23:21 +0200
committerNicolas Pitre <nicolas.pitre@linaro.org>2011-01-21 14:10:22 -0500
commit708c1e9f2b24bb34d75b36475ccd53b7a97a31a4 (patch)
treebbd87b6307e9d17bae69a148edc9a1971d1d89f6
parentdb74b3fe9090accb0bc9d1ba5a50bb527f93d1db (diff)
downloadlinux-linaro-708c1e9f2b24bb34d75b36475ccd53b7a97a31a4.tar.gz
omap: DMA: clear interrupt status correctly
When clearing the DMA channel, clear all status bits. When handling a DMA interrupt, clear only the interrupt status bits that have been read and are passed to the channel's interrupt handler, not every status bit. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: G, Manjunath Kondaiah <manjugk@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> (cherry picked from commit 4fb699b408b559107f1e1b47d176d33361446b69)
-rw-r--r--arch/arm/plat-omap/dma.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index c4b2b478b1a..85363084cc1 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -53,7 +53,7 @@ enum { DMA_CHAIN_STARTED, DMA_CHAIN_NOTSTARTED };
#endif
#define OMAP_DMA_ACTIVE 0x01
-#define OMAP2_DMA_CSR_CLEAR_MASK 0xffe
+#define OMAP2_DMA_CSR_CLEAR_MASK 0xffffffff
#define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec)
@@ -1873,7 +1873,7 @@ static int omap2_dma_handle_ch(int ch)
printk(KERN_INFO "DMA misaligned error with device %d\n",
dma_chan[ch].dev_id);
- p->dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR, ch);
+ p->dma_write(status, CSR, ch);
p->dma_write(1 << ch, IRQSTATUS_L0, ch);
/* read back the register to flush the write */
p->dma_read(IRQSTATUS_L0, ch);
@@ -1893,10 +1893,9 @@ static int omap2_dma_handle_ch(int ch)
OMAP_DMA_CHAIN_INCQHEAD(chain_id);
status = p->dma_read(CSR, ch);
+ p->dma_write(status, CSR, ch);
}
- p->dma_write(status, CSR, ch);
-
if (likely(dma_chan[ch].callback != NULL))
dma_chan[ch].callback(ch, status, dma_chan[ch].data);