]> git.baikalelectronics.ru Git - kernel.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)
commit0b99f2faa300ff4c584d462d92ae8ffba88dbcaf
treebd01cc1b347fa53e617ea734ad5497c46c41c0cb
parente64b5fa1af728a00837a0892d88cd7725c6d7a20
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