diff options
author | Per Forlin <per.forlin@stericsson.com> | 2011-10-18 18:39:47 +0200 |
---|---|---|
committer | Fabio Baltieri <fabio.baltieri@linaro.org> | 2013-01-14 10:50:18 +0100 |
commit | b96710e5b22609aa6e4ba5c3936ea7f026a7c427 (patch) | |
tree | c738ab582345c0b88c2bbc5310d0e799c3a082b2 /drivers/dma/ste_dma40.c | |
parent | 8a5d2039ab9050a8a2e649eaf3ca4e372a7709f1 (diff) | |
download | blackbird-op-linux-b96710e5b22609aa6e4ba5c3936ea7f026a7c427.tar.gz blackbird-op-linux-b96710e5b22609aa6e4ba5c3936ea7f026a7c427.zip |
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/ste_dma40.c')
-rw-r--r-- | drivers/dma/ste_dma40.c | 8 |
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 { int irq; int num_phy_chans; int num_log_chans; + struct device_dma_parameters dma_parms; struct dma_device dma_both; struct dma_device dma_slave; struct dma_device dma_memcpy; @@ -3362,6 +3363,13 @@ static int __init d40_probe(struct platform_device *pdev) if (err) goto failure; + base->dev->dma_parms = &base->dma_parms; + err = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE); + if (err) { + d40_err(&pdev->dev, "Failed to set dma max seg size\n"); + goto failure; + } + d40_hw_init(base); dev_info(base->dev, "initialized\n"); |