dmaengine: sprd: Set request pending flag when DMA controller is active
authorZhenfang Wang <zhenfang.wang@unisoc.com>
Thu, 12 Mar 2020 13:26:04 +0000 (21:26 +0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 23 Mar 2020 06:08:24 +0000 (11:38 +0530)
commitd0f19a48a185dab592afe1e18bf31a9d6790620d
tree8643c4904d337e0f063409a3415171d973340482
parent3a5a8a27545ddd8bbdcc9241230a2eed4e81c931
dmaengine: sprd: Set request pending flag when DMA controller is active

On new Spreadtrum platforms, when the CPU enters idle, it will close
the DMA controllers' clock to save power if the DMA controller is not
busy. Moreover the DMA controller's busy signal depends on the DMA
enable flag and the request pending flag.

When DMA controller starts to transfer data, which means we already
set the DMA enable flag, but now we should also set the request pending
flag, in case the DMA clock will be closed accidentally if the CPU
can not detect the DMA controller's busy signal.

Signed-off-by: Zhenfang Wang <zhenfang.wang@unisoc.com>
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Link: https://lore.kernel.org/r/02adbe4364ec436ec2c5bc8fd2386bab98edd884.1584019223.git.baolin.wang7@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sprd-dma.c