summaryrefslogtreecommitdiff
path: root/drivers/dma/dw-axi-dmac
diff options
context:
space:
mode:
authorWalker Chen <walker.chen@starfivetech.com>2023-03-22 17:48:19 +0800
committerVinod Koul <vkoul@kernel.org>2023-04-12 23:18:43 +0530
commitce62432cb8bb56a5fde544d01213e952c3a92f8b (patch)
treeb6802fc1db8c256c486f1cd9ca2b696e2db9dde5 /drivers/dma/dw-axi-dmac
parent790f3c8b8f9f63b1f5a3ffd06630ed3d0df9804c (diff)
dmaengine: dw-axi-dmac: Increase polling time to DMA transmission completion status
The bit DMAC_CHEN[0] is automatically cleared by hardware to disable the channel after the last AMBA transfer of the DMA transfer to the destination has completed. Software can therefore poll this bit to determine when this channel is free for a new DMA transfer. This time requires at least 40 milliseconds on JH7110 SoC, otherwise an error message 'failed to stop' will be reported. Signed-off-by: Walker Chen <walker.chen@starfivetech.com> Link: https://lore.kernel.org/r/20230322094820.24738-4-walker.chen@starfivetech.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/dw-axi-dmac')
-rw-r--r--drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index 6cfcb541d8c3..6937cc0c0b65 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -1147,7 +1147,7 @@ static int dma_chan_terminate_all(struct dma_chan *dchan)
axi_chan_disable(chan);
ret = readl_poll_timeout_atomic(chan->chip->regs + DMAC_CHEN, val,
- !(val & chan_active), 1000, 10000);
+ !(val & chan_active), 1000, 50000);
if (ret == -ETIMEDOUT)
dev_warn(dchan2dev(dchan),
"%s failed to stop\n", axi_chan_name(chan));