dmaengine: sprd: Fix the DMA link-list configuration
authorBaolin Wang <baolin.wang@linaro.org>
Fri, 30 Aug 2019 07:37:45 +0000 (15:37 +0800)
committerVinod Koul <vkoul@kernel.org>
Wed, 4 Sep 2019 05:55:38 +0000 (11:25 +0530)
commit689379c2f383b1fdfdff03e84cf659daf62f2088
treef52c1aedf8afe47d585e775480744a019a7b656a
parent962411b05a6d3342aa649e39cda1704c1fc042c6
dmaengine: sprd: Fix the DMA link-list configuration

For the Spreadtrum DMA link-list mode, when the DMA engine got a slave
hardware request, which will trigger the DMA engine to load the DMA
configuration from the link-list memory automatically. But before the
slave hardware request, the slave will get an incorrect residue due
to the first node used to trigger the link-list was configured as the
last source address and destination address.

Thus we should make sure the first node was configured the start source
address and destination address, which can fix this issue.

Fixes: 4ac695464763 ("dmaengine: sprd: Support DMA link-list mode")
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Link: https://lore.kernel.org/r/77868edb7aff9d5cb12ac3af8827ef2e244441a6.1567150471.git.baolin.wang@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sprd-dma.c