summaryrefslogtreecommitdiff
path: root/drivers/dma/hsu
diff options
context:
space:
mode:
authorNandor Han <nandor.han@ge.com>2016-10-11 14:13:41 +0300
committerVinod Koul <vinod.koul@intel.com>2016-11-25 11:05:14 +0530
commit85f57752b33cf12f1d583f0c10b752292de00abe (patch)
treeeb1d1bf3c9bd96e908d54d4d944f23d10fbcc7a2 /drivers/dma/hsu
parentc44da03dd517c11c2b3525937b0a241fc1c69399 (diff)
downloadlinux-next-85f57752b33cf12f1d583f0c10b752292de00abe.tar.gz
dmaengine: imx-sdma - correct the dma transfer residue calculation
The residue calculation was taking in consideration that dma transaction status will be always retrieved in the dma callback used to inform that dma transfer is complete. However this is not the case for all subsystems that use dma. Some subsystems use a timer to check the dma status periodically. Therefore the calculation was updated and residue is calculated accordingly by a) update the residue calculation taking in consideration the last used buffer index by using *buf_ptail* variable and b) chn_real_count (number of bytes transferred) is initialized to zero, when dma channel is created, to avoid using an uninitialized value in residue calculation when dma status is checked without waiting dma complete event. Signed-off-by: Nandor Han <nandor.han@ge.com> Acked-by: Peter Senna Tschudin <peter.senna@collabora.com> Tested-by: Peter Senna Tschudin <peter.senna@collabora.com> Tested-by: Marek Vasut <marex@denx.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/hsu')
0 files changed, 0 insertions, 0 deletions