k3dma: Fix hisi burst clipping
authorAndy Green <andy.green@linaro.org>
Mon, 29 Aug 2016 17:30:47 +0000 (10:30 -0700)
committerVinod Koul <vinod.koul@intel.com>
Wed, 31 Aug 2016 04:39:32 +0000 (10:09 +0530)
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@linaro.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Andy Green <andy@warmcat.com>
Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
[jstultz: Forward ported to mainline]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/k3dma.c

index 39de8980128c1c0ae2092110f0a4138e0a6a4bab..3d514692bdc61495af197d847b9001b9793eb139 100644 (file)
@@ -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);