Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: common: edma: clear completion interrupts on stop

When stopping a DMA transfer with interrupts disabled it is possible
that the DMA transfer completes before the events are cleared. In
this case the completion interrupt will be pending, causing a
completion callback after the transfer was stopped.

By clearing the completion interrupt for the stopping channel it is
ensured that no completion event will be generated after the stop.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

John Ogness and committed by
Greg Kroah-Hartman
c2d4bb9d 35a0f950

+3
+3
arch/arm/common/edma.c
··· 1350 1350 edma_shadow0_write_array(ctlr, SH_SECR, j, mask); 1351 1351 edma_write_array(ctlr, EDMA_EMCR, j, mask); 1352 1352 1353 + /* clear possibly pending completion interrupt */ 1354 + edma_shadow0_write_array(ctlr, SH_ICR, j, mask); 1355 + 1353 1356 pr_debug("EDMA: EER%d %08x\n", j, 1354 1357 edma_shadow0_read_array(ctlr, SH_EER, j)); 1355 1358