aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorPer Forlin <per.forlin@stericsson.com>2011-10-18 12:39:47 -0400
committerFabio Baltieri <fabio.baltieri@linaro.org>2013-01-14 04:50:18 -0500
commitb96710e5b22609aa6e4ba5c3936ea7f026a7c427 (patch)
treec738ab582345c0b88c2bbc5310d0e799c3a082b2 /drivers/dma
parent8a5d2039ab9050a8a2e649eaf3ca4e372a7709f1 (diff)
dmaengine: ste_dma40: set dma max seg size
Maximum DMA seg size is (0xffff x data_width). If max seg size is not set it deafults to 64k. This results in failure if transferring 64k in byte mode. Large seg sizes may be supported by splitting large transfer. 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')
-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 23c5573e62dd..f5724d95ed48 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -344,6 +344,7 @@ struct d40_base {
344 int irq; 344 int irq;
345 int num_phy_chans; 345 int num_phy_chans;
346 int num_log_chans; 346 int num_log_chans;
347 struct device_dma_parameters dma_parms;
347 struct dma_device dma_both; 348 struct dma_device dma_both;
348 struct dma_device dma_slave; 349 struct dma_device dma_slave;
349 struct dma_device dma_memcpy; 350 struct dma_device dma_memcpy;
@@ -3362,6 +3363,13 @@ static int __init d40_probe(struct platform_device *pdev)
3362 if (err) 3363 if (err)
3363 goto failure; 3364 goto failure;
3364 3365
3366 base->dev->dma_parms = &base->dma_parms;
3367 err = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE);
3368 if (err) {
3369 d40_err(&pdev->dev, "Failed to set dma max seg size\n");
3370 goto failure;
3371 }
3372
3365 d40_hw_init(base); 3373 d40_hw_init(base);
3366 3374
3367 dev_info(base->dev, "initialized\n"); 3375 dev_info(base->dev, "initialized\n");