aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ste_dma40.c
diff options
context:
space:
mode:
authorPer Forlin <per.forlin@stericsson.com>2011-10-13 06:11:36 -0400
committerFabio Baltieri <fabio.baltieri@linaro.org>2013-01-14 04:50:27 -0500
commit92bb6cdb5302a4b0b3c6b6cfc0854aaed882c4bc (patch)
treecad01bad6f27e959d94e8261499fb72fb9544173 /drivers/dma/ste_dma40.c
parentb96710e5b22609aa6e4ba5c3936ea7f026a7c427 (diff)
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: Per Forlin <per.forlin@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Diffstat (limited to 'drivers/dma/ste_dma40.c')
-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 f5724d95ed48..2d0c63dcd84c 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -2578,6 +2578,14 @@ static int d40_set_runtime_config(struct dma_chan *chan,
2578 return -EINVAL; 2578 return -EINVAL;
2579 } 2579 }
2580 2580
2581 if (src_maxburst > 16) {
2582 src_maxburst = 16;
2583 dst_maxburst = src_maxburst * src_addr_width / dst_addr_width;
2584 } else if (dst_maxburst > 16) {
2585 dst_maxburst = 16;
2586 src_maxburst = dst_maxburst * dst_addr_width / src_addr_width;
2587 }
2588
2581 ret = dma40_config_to_halfchannel(d40c, &cfg->src_info, 2589 ret = dma40_config_to_halfchannel(d40c, &cfg->src_info,
2582 src_addr_width, 2590 src_addr_width,
2583 src_maxburst); 2591 src_maxburst);