linux_dsm_epyc7002/drivers/dma/ti
Peter Ujfalusi 097ffdc752 dmaengine: ti: edma: Correct the residue calculation (fix for memcpy)
For memcpy we never stored the start address of the transfer for the pset
which rendered the memcpy residue calculation completely broken.

In the edma_residue() function we also need to to some correction for the
calculations:
Instead waiting for all EDMA channels to be idle (in a busy system it can
take few iteration to hit a point when all queues are idle) wait for the
event pending on the given channel (SH_ER for hw synchronized channels,
SH_ESR for manually triggered channels).

If the position returned by EMDA is 0 it implies that the last paRAM set
has been consumed and we are at the closing dummy set, thus we can conclude
that the transfer is completed and we can return 0 as residue.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
[vkoul: fixed typo in commit log]
Link: https://lore.kernel.org/r/20190716082655.1620-3-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2019-07-29 12:11:38 +05:30
..
cppi41.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
dma-crossbar.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
edma.c dmaengine: ti: edma: Correct the residue calculation (fix for memcpy) 2019-07-29 12:11:38 +05:30
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile dmaengine: ti: New directory for Texas Instruments DMA drivers 2018-04-25 14:56:21 +05:30
omap-dma.c dmaengine: ti: omap-dma: Improved memcpy polling support 2019-07-29 12:05:01 +05:30