diff mbox series

[2/2] soc: imx: gpcv2: set DMA mask for PD platform devices

Message ID 20190906103401.22294-3-l.stach@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series i.MX GPC DMA warning fixes | expand

Commit Message

Lucas Stach Sept. 6, 2019, 10:34 a.m. UTC
The PD platform devices aren't DMA capable (as is correctly reflected
in with a zero mask coherent_dma_mask). As they have a of_node attached
they will go through of_dma_configure, which will warn if it finds an
uninitialized DMA mask. Let the driver core know that this isn't a
missing configuration, but a non DMA capable device by pointing the
dma_mask to the coherent_dma_mask.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/soc/imx/gpcv2.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index 31b8d002d855..7268f69a8d03 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -626,6 +626,7 @@  static int imx_gpcv2_probe(struct platform_device *pdev)
 
 		pd_pdev->dev.parent = dev;
 		pd_pdev->dev.of_node = np;
+		pd_pdev->dev.dma_mask = &pd_pdev->dev.coherent_dma_mask;
 
 		ret = platform_device_add(pd_pdev);
 		if (ret) {