提交 52176e70 编写于 作者: S Santosh Shilimkar 提交者: Tony Lindgren

ARM: OMAP: Dispatch only relevant DMA interrupts

This fixes the spurious interrupt issue on a DMA channel.

In OMAP sDMA, contrast to the SDMA.DMA4_CSRi registers, the
SDMA.DMA4_IRQSTATUS_Lj registers are updated regardless of
the corresponding bits in the SDMA.DMA4_IRQENABLE_Lj registers.
Since there are four sDMA interrupt lines and if more than one
line is actively used by two concurrently running sDMA softwares
modules,then the spurious interrupt can be observed on the other
lines.

Fix in this patch will only dispatch the relevant and enabled
interrupts on a particular line thus perevting spurious IRQ.
Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: NNishant Kamat <nskamat@ti.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 2263f022
...@@ -1901,7 +1901,7 @@ static int omap2_dma_handle_ch(int ch) ...@@ -1901,7 +1901,7 @@ static int omap2_dma_handle_ch(int ch)
/* STATUS register count is from 1-32 while our is 0-31 */ /* STATUS register count is from 1-32 while our is 0-31 */
static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id) static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id)
{ {
u32 val; u32 val, enable_reg;
int i; int i;
val = dma_read(IRQSTATUS_L0); val = dma_read(IRQSTATUS_L0);
...@@ -1910,6 +1910,8 @@ static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id) ...@@ -1910,6 +1910,8 @@ static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id)
printk(KERN_WARNING "Spurious DMA IRQ\n"); printk(KERN_WARNING "Spurious DMA IRQ\n");
return IRQ_HANDLED; return IRQ_HANDLED;
} }
enable_reg = dma_read(IRQENABLE_L0);
val &= enable_reg; /* Dispatch only relevant interrupts */
for (i = 0; i < dma_lch_count && val != 0; i++) { for (i = 0; i < dma_lch_count && val != 0; i++) {
if (val & 1) if (val & 1)
omap2_dma_handle_ch(i); omap2_dma_handle_ch(i);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册