* dmaengine: rcar-dmac: set scatter/gather max segment size
@ 2018-09-14 15:43 Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2018-09-14 15:43 UTC (permalink / raw)
To: dmaengine; +Cc: linux-renesas-soc, Geert Uytterhoeven, Wolfram Sang
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>
---
Change since RFC: use better value, confirmed with Geert (thanks!)
drivers/dma/sh/rcar-dmac.c | 3 +++
1 file changed, 3 insertions(+)
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* dmaengine: rcar-dmac: set scatter/gather max segment size
@ 2018-10-07 14:34 Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2018-10-07 14:34 UTC (permalink / raw)
To: Wolfram Sang; +Cc: dmaengine, linux-renesas-soc, Geert Uytterhoeven
On 14-09-18, 17:43, Wolfram Sang wrote:
> 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.
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-07 14:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-07 14:34 dmaengine: rcar-dmac: set scatter/gather max segment size Vinod Koul
-- strict thread matches above, loose matches on Subject: below --
2018-09-14 15:43 Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).