rcar-dmac: fixup descriptor pointer for descriptor mode
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 23 May 2017 07:08:43 +0000 (07:08 +0000)
committerVinod Koul <vinod.koul@intel.com>
Tue, 30 May 2017 06:19:28 +0000 (11:49 +0530)
commit56b177055adb246cdeca174331dbf92fc49bfccd
tree65f7f1be8ccc4c48a84671663f7c683719d10363
parent98f9de366fccee7572c646af226b2d4b4841e3b5
rcar-dmac: fixup descriptor pointer for descriptor mode

In descriptor mode, the descriptor running pointer is not maintained
by the interrupt handler, thus, driver finds the running descriptor
from the descriptor pointer field in the CHCRB register.
But, CHCRB::DPTR indicates *next* descriptor pointer, not current.
Thus, The residue calculation will be missed. This patch fixup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/sh/rcar-dmac.c