dmaengine: rcar-dmac: ensure CHCR DE bit is actually 0 after clearing
DMAC reads data from source device, and buffered it until transferable
size for sink device. Because of this behavior, DMAC is including
buffered data .
Now, CHCR DE bit is controlling DMA transfer enable/disable.
If DE bit was cleared during data transferring, or during buffering,
it will flush buffered data if source device was peripheral device
(The buffered data will be removed if source device was memory).
Because of this behavior, driver should ensure that DE bit is actually
0 after clearing.
This patch adds new rcar_dmac_chcr_de_barrier() and call it after CHCR
Signed-off-by: Kuninori Morimoto <firstname.lastname@example.org>
Tested-by: Hiroyuki Yokoyama <email@example.com>
Tested-by: Ryo Kodama <firstname.lastname@example.org>
Tested-by: Geert Uytterhoeven <email@example.com>
Signed-off-by: Vinod Koul <firstname.lastname@example.org>
(cherry picked from commit a8d46a7f5d17ca9cbe9e9c7d1d23dc6ea437e141)
Signed-off-by: Fabrizio Castro <email@example.com>
Reviewed-by: Biju Das <firstname.lastname@example.org>
Signed-off-by: Ben Hutchings <email@example.com>
1 file changed