Commit 4fb699b4 authored by Adrian Hunter's avatar Adrian Hunter Committed by Tony Lindgren

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: default avatarAdrian Hunter <adrian.hunter@nokia.com>
Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: default avatarG, Manjunath Kondaiah <manjugk@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 35a78fa4
...@@ -53,7 +53,7 @@ enum { DMA_CHAIN_STARTED, DMA_CHAIN_NOTSTARTED }; ...@@ -53,7 +53,7 @@ enum { DMA_CHAIN_STARTED, DMA_CHAIN_NOTSTARTED };
#endif #endif
#define OMAP_DMA_ACTIVE 0x01 #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) #define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec)
...@@ -1873,7 +1873,7 @@ static int omap2_dma_handle_ch(int ch) ...@@ -1873,7 +1873,7 @@ static int omap2_dma_handle_ch(int ch)
printk(KERN_INFO "DMA misaligned error with device %d\n", printk(KERN_INFO "DMA misaligned error with device %d\n",
dma_chan[ch].dev_id); 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); p->dma_write(1 << ch, IRQSTATUS_L0, ch);
/* read back the register to flush the write */ /* read back the register to flush the write */
p->dma_read(IRQSTATUS_L0, ch); p->dma_read(IRQSTATUS_L0, ch);
...@@ -1893,9 +1893,8 @@ static int omap2_dma_handle_ch(int ch) ...@@ -1893,9 +1893,8 @@ static int omap2_dma_handle_ch(int ch)
OMAP_DMA_CHAIN_INCQHEAD(chain_id); OMAP_DMA_CHAIN_INCQHEAD(chain_id);
status = p->dma_read(CSR, ch); 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)) if (likely(dma_chan[ch].callback != NULL))
dma_chan[ch].callback(ch, status, dma_chan[ch].data); dma_chan[ch].callback(ch, status, dma_chan[ch].data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment