[PATCH 0/2 v2] dmaengine: rcar-dmac: use TCRB instead of TCR

From: Kuninori Morimoto
Date: Wed Nov 15 2017 - 23:31:35 EST



Hi Vinod
Cc Geert, Laurent

These are v2 of dmaengine fixup for Renesas SoC.
v1 patch solved "sound noise" issue, but breaked "serial input".

The reason was that DMAC buffers read data until transferable size to write side.
This buffered data will be transfered if <1> it reached to transferable size,
<2> DE bit became 0.
In current driver, DE bit will be 0 if driver called dmaengine_terminate_all().

Thus, we need to flush this buffered data before getting residue.
And we need to check this DE bit was realy 0 when we cleared it.
Because DMAC will start to transfer bufferred data if DE was cleared, and then,
DE was 1 until finished.

I tested this patch with CONFIG_SERIAL_SH_SCI_DMA, and serial works correctly.

Kuninori Morimoto (2):
dmaengine: rcar-dmac: ensure CHCR DE bit is actually 0 after clear
dmaengine: rcar-dmac: use TCRB instead of TCR for residue

--
1.9.1