diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-09-14 17:43:28 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2018-10-07 16:34:14 +0200 |
commit | 97d49c59e219acac576e16293a6b8cb99302f62f (patch) | |
tree | 3afecf6a7d7036c165f0e1dc6f787169824ce8ce /drivers/dma/sh | |
parent | dt-bindings: dmaengine: usb-dmac: Add binding for r8a7744 (diff) | |
download | linux-97d49c59e219acac576e16293a6b8cb99302f62f.tar.xz linux-97d49c59e219acac576e16293a6b8cb99302f62f.zip |
dmaengine: rcar-dmac: set scatter/gather max segment size
Fix warning when running with CONFIG_DMA_API_DEBUG_SG=y by allocating a
device_dma_parameters structure and filling in the max segment size.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/sh')
-rw-r--r-- | drivers/dma/sh/rcar-dmac.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 48ee35e2bce6..74fa2b1a6a86 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -198,6 +198,7 @@ struct rcar_dmac { struct dma_device engine; struct device *dev; void __iomem *iomem; + struct device_dma_parameters parms; unsigned int n_channels; struct rcar_dmac_chan *channels; @@ -1792,6 +1793,8 @@ static int rcar_dmac_probe(struct platform_device *pdev) dmac->dev = &pdev->dev; platform_set_drvdata(pdev, dmac); + dmac->dev->dma_parms = &dmac->parms; + dma_set_max_seg_size(dmac->dev, RCAR_DMATCR_MASK); dma_set_mask_and_coherent(dmac->dev, DMA_BIT_MASK(40)); ret = rcar_dmac_parse_of(&pdev->dev, dmac); |