aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPer Forlin <per.forlin@stericsson.com>2011-10-13 12:11:36 +0200
committerLinus WALLEIJ <linus.walleij@stericsson.com>2011-10-25 14:33:14 +0200
commit2efff037e37390f9685dc511176744795ed6f048 (patch)
treefda341067789905bc25ccbda68982e928e4090d6
parent5c2417191a367e33931e5c454e3de807de2c790d (diff)
dmaengine/ste_dma40: limit burst size to 16u8500-android-2.3_v4.23
The client is not aware of the maximum burst size in the dma driver. If the size exceeds 16 set max to 16. ST-Ericsson ID: 363565 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: NA Change-Id: I298b779db3d42944f2fcc9688fe519f640cca99d Signed-off-by: Per Forlin <per.forlin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34361 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
-rw-r--r--drivers/dma/ste_dma40.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 9430f05c4c7..eb241159cae 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -2588,6 +2588,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);