]> asedeno.scripts.mit.edu Git - linux.git/commit
dmaengine: axi-dmac: populate residue info for completed xfers
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Thu, 6 Jun 2019 10:45:48 +0000 (13:45 +0300)
committerVinod Koul <vkoul@kernel.org>
Fri, 14 Jun 2019 05:52:43 +0000 (11:22 +0530)
commite3923592f80ba93aaa35b8d49b1f0a5b31db6b7f
tree0e1764fe94801d60fb40e35d10bb83d69064ba9b
parent09d5b702b0f97dd0768dade7106b6bf7622b1355
dmaengine: axi-dmac: populate residue info for completed xfers

Starting with version 4.2.a, the AXI DMAC controller can report partial
transfers that have been issued.

This change implements computing DMA residue information for transfers,
based on that reported information.

The way this is done, is to dequeue the partial transfers from the FIFO of
partial transfers, store the partial length to the correct segment &
descriptor, and compute the residue before submitting the DMA cookie to the
DMA framework.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dma-axi-dmac.c