dmaengine: pl330: flush before first loop

This makes sure dma can get peripheral request.

Change-Id: I85feb4ade8796490e5d53cd4c9e610775cfd0175
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
This commit is contained in:
Huibin Hong 2018-01-18 11:30:37 +08:00 committed by Tao Huang
parent 98753e172d
commit 34be2cf467

View File

@ -1347,7 +1347,11 @@ static inline int _loop_cyclic(struct pl330_dmac *pl330, unsigned dry_run,
/* forever loop */
off += _emit_MOV(dry_run, &buf[off], SAR, x->src_addr);
off += _emit_MOV(dry_run, &buf[off], DAR, x->dst_addr);
#ifdef CONFIG_ARCH_ROCKCHIP
if (!(pl330->quirks & PL330_QUIRK_BROKEN_NO_FLUSHP))
off += _emit_FLUSHP(dry_run, &buf[off],
pxs->desc->peri);
#endif
/* loop0 */
off += _emit_LP(dry_run, &buf[off], 0, lcnt0);
ljmp0 = off;
@ -1423,7 +1427,11 @@ static inline int _setup_loops(struct pl330_dmac *pl330,
u32 ccr = pxs->ccr;
unsigned long c, bursts = BYTE_TO_BURST(x->bytes, ccr);
int off = 0;
#ifdef CONFIG_ARCH_ROCKCHIP
if (!(pl330->quirks & PL330_QUIRK_BROKEN_NO_FLUSHP))
off += _emit_FLUSHP(dry_run, &buf[off],
pxs->desc->peri);
#endif
while (bursts) {
c = bursts;
off += _loop(pl330, dry_run, &buf[off], &c, pxs);