From d7155171cbc65e45b5b0c8db03fd16fa57a181f2 Mon Sep 17 00:00:00 2001 From: Huibin Hong Date: Thu, 12 Oct 2017 17:00:37 +0800 Subject: [PATCH] dmaengine: pl330: _loop_cyclic fix cycles of last loop It has been tested by i2s, we can hear noise when play music by unalign buffer size. Change-Id: Ie52d5ac79c71df8fcec841d8801e24280831420e Signed-off-by: Huibin Hong --- drivers/dma/pl330.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 1e5c79b20c5b..cd05495735d7 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -1366,7 +1366,7 @@ static inline int _loop_cyclic(struct pl330_dmac *pl330, unsigned dry_run, ccr &= ~(0xf << CC_SRCBRSTLEN_SHFT); ccr &= ~(0xf << CC_DSTBRSTLEN_SHFT); off += _emit_MOV(dry_run, &buf[off], CCR, ccr); - off += _emit_LP(dry_run, &buf[off], 1, c - 1); + off += _emit_LP(dry_run, &buf[off], 1, c); ljmp1 = off; off += _bursts(pl330, dry_run, &buf[off], pxs, 1); lpend.cond = ALWAYS;