[PATCH 2/7] k3dma: Fix hisi burst clipping

From: John Stultz
Date: Mon Aug 08 2016 - 20:16:07 EST


From: Andy Green <andy.green@xxxxxxxxxx>

Max burst len is a 4-bit field, but at the moment it's clipped with
a 5-bit constant... reduce it to that which can be expressed

Cc: Zhangfei Gao <zhangfei.gao@xxxxxxxxxx>
Cc: Jingoo Han <jg1.han@xxxxxxxxxxx>
Cc: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>
Cc: Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx>
Cc: Vinod Koul <vinod.koul@xxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Mark Brown <broonie@xxxxxxxxxx>
Cc: Andy Green <andy@xxxxxxxxxxx>
Acked-by: Zhangfei Gao <zhangfei.gao@xxxxxxxxxx>
Signed-off-by: Andy Green <andy.green@xxxxxxxxxx>
[jstultz: Forward ported to mainline]
Signed-off-by: John Stultz <john.stultz@xxxxxxxxxx>
---
drivers/dma/k3dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c
index 39de898..3d51469 100644
--- a/drivers/dma/k3dma.c
+++ b/drivers/dma/k3dma.c
@@ -551,7 +551,7 @@ static int k3_dma_config(struct dma_chan *chan,
c->ccfg |= (val << 12) | (val << 16);

if ((maxburst == 0) || (maxburst > 16))
- val = 16;
+ val = 15;
else
val = maxburst - 1;
c->ccfg |= (val << 20) | (val << 24);
--
1.9.1