Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92bb6cdb authored by Per Forlin's avatar Per Forlin Committed by Fabio Baltieri
Browse files

dmaengine: ste_dma40: limit burst size to 16



The client is not aware of the maximum burst size in the dma driver.  If
the size exceeds 16 set max to 16.

Signed-off-by: default avatarPer Forlin <per.forlin@stericsson.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarFabio Baltieri <fabio.baltieri@linaro.org>
parent b96710e5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2578,6 +2578,14 @@ static int d40_set_runtime_config(struct dma_chan *chan,
		return -EINVAL;
	}

	if (src_maxburst > 16) {
		src_maxburst = 16;
		dst_maxburst = src_maxburst * src_addr_width / dst_addr_width;
	} else if (dst_maxburst > 16) {
		dst_maxburst = 16;
		src_maxburst = dst_maxburst * dst_addr_width / src_addr_width;
	}

	ret = dma40_config_to_halfchannel(d40c, &cfg->src_info,
					  src_addr_width,
					  src_maxburst);