dmaengine: sprd: Fix the link-list pointer register configuration issue
authorZhenfang Wang <zhenfang.wang@unisoc.com>
Thu, 12 Sep 2019 05:47:18 +0000 (13:47 +0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 14 Oct 2019 05:02:18 +0000 (10:32 +0530)
commit8b6bc5fd71e677864d1a3b896b3069a6e0c5e214
treebfd87ebd2a3b875479f08572971dbbf2ba48cdd2
parent54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c
dmaengine: sprd: Fix the link-list pointer register configuration issue

We will set the link-list pointer register point to next link-list
configuration's physical address, which can load DMA configuration
from the link-list node automatically.

But the link-list node's physical address can be larger than 32bits,
and now Spreadtrum DMA driver only supports 32bits physical address,
which may cause loading a incorrect DMA configuration when starting
the link-list transfer mode. According to the DMA datasheet, we can
use SRC_BLK_STEP register (bit28 - bit31) to save the high bits of the
link-list node's physical address to fix this issue.

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