Skip to contentSkip to conversation

iommu/omap: Add registration for DT fwnode pointer

PATCH Applied Tero Kristo via iommu 2 participants 3 messages Apr 24, 2020 – May 18, 2020 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/omap: Add registration for DT fwnode pointer

The fwnode pointer must be passed to the iommu core, so that the core can map the IOMMU towards device requests properly. Without this, some IOMMU clients like OMAP remoteproc will fail the iommu configuration multiple times with -EPROBE_DEFER, which will eventually be ignored with a kernel warning banner.

---
 drivers/iommu/omap-iommu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iommu/omap-iommu.c +1 -0
index 887fefcb03b4..934726e20b72 100644
@@ -1248,6 +1248,7 @@ static int omap_iommu_probe(struct platform_device *pdev)
 			goto out_group;
 
 		iommu_device_set_ops(&obj->iommu, &omap_iommu_ops);
+		iommu_device_set_fwnode(&obj->iommu, &of->fwnode);
 
 		err = iommu_device_register(&obj->iommu);
 		if (err)
Signature · 8 lines
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
#1 lore raw
Quoted 7 lines · Tero Kristo via iommu

The fwnode pointer must be passed to the iommu core, so that the core can map the IOMMU towards device requests properly. Without this, some IOMMU clients like OMAP remoteproc will fail the iommu configuration multiple times with -EPROBE_DEFER, which will eventually be ignored with a kernel warning banner.

Hi Joerg,

I noticed this is still missing from next but there are some other OMAP iommu patches queued up (see the bug fix I just posted against -next.)

Whats the plan with this one?

-Tero

Quoted 10 lines
---
  drivers/iommu/omap-iommu.c | 1 +
  1 file changed, 1 insertion(+)
drivers/iommu/omap-iommu.c +0 -0
index 887fefcb03b4..934726e20b72 100644

drivers/iommu/omap-iommu.c static int omap_iommu_probe(struct platform_device *pdev) · line 1254

Quoted 7 lines
drivers/iommu/omap-iommu.c +1 -0
@@ -1248,6 +1248,7 @@ static int omap_iommu_probe(struct platform_device *pdev)
  			goto out_group;
 
  		iommu_device_set_ops(&obj->iommu, &omap_iommu_ops);
+		iommu_device_set_fwnode(&obj->iommu, &of->fwnode);
 
  		err = iommu_device_register(&obj->iommu);
  		if (err)

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

maintainer Applied
#2 lore raw
In reply to Tero Kristo via iommu
Quoted 10 lines · Tero Kristo

The fwnode pointer must be passed to the iommu core, so that the core can map the IOMMU towards device requests properly. Without this, some IOMMU clients like OMAP remoteproc will fail the iommu configuration multiple times with -EPROBE_DEFER, which will eventually be ignored with a kernel warning banner.

---
 drivers/iommu/omap-iommu.c | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks.

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu