Skip to content

Commit 97d49c5

Browse files
Wolfram Sangvinodkoul
authored andcommitted
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>
1 parent cf1b2c3 commit 97d49c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/dma/sh/rcar-dmac.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ struct rcar_dmac {
198198
struct dma_device engine;
199199
struct device *dev;
200200
void __iomem *iomem;
201+
struct device_dma_parameters parms;
201202

202203
unsigned int n_channels;
203204
struct rcar_dmac_chan *channels;
@@ -1792,6 +1793,8 @@ static int rcar_dmac_probe(struct platform_device *pdev)
17921793

17931794
dmac->dev = &pdev->dev;
17941795
platform_set_drvdata(pdev, dmac);
1796+
dmac->dev->dma_parms = &dmac->parms;
1797+
dma_set_max_seg_size(dmac->dev, RCAR_DMATCR_MASK);
17951798
dma_set_mask_and_coherent(dmac->dev, DMA_BIT_MASK(40));
17961799

17971800
ret = rcar_dmac_parse_of(&pdev->dev, dmac);

0 commit comments

Comments
 (0)