dmaengine i.MX dma: set maximum segment size for our device
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 12 Jan 2011 12:14:37 +0000 (13:14 +0100)
committerSascha Hauer <s.hauer@pengutronix.de>
Mon, 31 Jan 2011 11:35:52 +0000 (12:35 +0100)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
drivers/dma/imx-dma.c

index e53d438..a46e1d9 100644 (file)
@@ -49,6 +49,7 @@ struct imxdma_channel {
 
 struct imxdma_engine {
        struct device                   *dev;
+       struct device_dma_parameters    dma_parms;
        struct dma_device               dma_device;
        struct imxdma_channel           channel[MAX_DMA_CHANNELS];
 };
@@ -370,6 +371,9 @@ static int __init imxdma_probe(struct platform_device *pdev)
 
        platform_set_drvdata(pdev, imxdma);
 
+       imxdma->dma_device.dev->dma_parms = &imxdma->dma_parms;
+       dma_set_max_seg_size(imxdma->dma_device.dev, 0xffffff);
+
        ret = dma_async_device_register(&imxdma->dma_device);
        if (ret) {
                dev_err(&pdev->dev, "unable to register\n");