]> asedeno.scripts.mit.edu Git - linux.git/commit
dmaengine: ti: edma: Support for polled (memcpy) completion
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Tue, 16 Jul 2019 08:26:55 +0000 (11:26 +0300)
committerVinod Koul <vkoul@kernel.org>
Mon, 29 Jul 2019 06:41:38 +0000 (12:11 +0530)
commitaa3c6ce4eab8fb0e967954be1ba1cad3b715f63b
treebd01cc1b347fa53e617ea734ad5497c46c41c0cb
parent097ffdc75259139ba157b7f924cfeb0d6b00559e
dmaengine: ti: edma: Support for polled (memcpy) completion

When a DMA client driver does not set the DMA_PREP_INTERRUPT because it
does not want to use interrupts for DMA completion or because it can not
rely on DMA interrupts due to executing the memcpy when interrupts are
disabled it will poll the status of the transfer.

Since we can not tell from any EDMA register that the transfer is
completed, we can only know that the paRAM set has been sent to TPTC for
processing we need to check the residue of the transfer, if it is 0 then
the transfer is completed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20190716082655.1620-4-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ti/edma.c