Skip to contentSkip to conversation

soc: imx: gpc: set DMA mask for PD platform devices

PATCH New Lucas Stach 3 participants 6 messages Sep 12, 2018 – Jan 24, 2019 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: imx: gpc: set DMA mask for PD platform devices

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.

---
Since the warning that is triggered with the incomplete configuration has been introduced in the v4.19 cycle, it would nice to get this in as a fix.

---
 drivers/soc/imx/gpc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/imx/gpc.c +1 -0
index f301fcd96c07..a897c851f305 100644
@@ -493,6 +493,7 @@ static int imx_gpc_probe(struct platform_device *pdev)
 
 			pd_pdev->dev.parent = &pdev->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) {
Signature · 1 line
2.18.0
reviewer
#1 lore raw

PATCH 1/1 soc: imx: gpc: set DMA mask for PD platform devices

Hi Lucas,

Quoted 8 lines · Lucas Stach

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.

This fixes the following warnings seen on imx6q-sabresd:

[    1.323046] imx-pgc-pd imx-pgc-power-domain.0: DMA mask not set
[    1.323700] imx-pgc-pd imx-pgc-power-domain.1: DMA mask not set
Applied
#2 lore raw

PATCH 1/1 soc: imx: gpc: set DMA mask for PD platform devices

In reply to Lucas Stach
Quoted 7 lines · Lucas Stach

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.

Quoted 5 lines

---
Since the warning that is triggered with the incomplete configuration has been introduced in the v4.19 cycle, it would nice to get this in as a fix.

Applied as a fix, thanks.

reviewer
#3 lore raw

Hi Shawn,

Quoted 9 lines · Shawn Guo
Quoted 7 lines · Lucas Stach

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.

Quoted 7 lines
Quoted 5 lines

---
Since the warning that is triggered with the incomplete configuration has been introduced in the v4.19 cycle, it would nice to get this in as a fix.

Applied as a fix, thanks.

Did you forget to push this change? I still don't see it applied.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#4 lore raw

Hi Fabio,

Am Donnerstag, den 24.01.2019, 09:46 -0200 schrieb Fabio Estevam:

Quoted 26 lines

Hi Shawn,

Quoted 22 lines · Shawn Guo
Quoted 19 lines · Lucas Stach

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.

---
Since the warning that is triggered with the incomplete configuration
has been introduced in the v4.19 cycle, it would nice to get this in
as a fix.

Quoted 3 lines
Quoted 1 line

Applied as a fix, thanks.

Did you forget to push this change? I still don't see it applied.

It was dropped due to discussion in the pull request:

https://patchwork.kernel.org/patch/10621589/

It seems we are stuck there and I don't have the bandwidth to follow up with this currently.

Regards,
Lucas

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel