|
@@ -1133,6 +1133,8 @@ static int rk_iommu_probe(struct platform_device *pdev)
|
|
if (!dma_dev)
|
|
if (!dma_dev)
|
|
dma_dev = &pdev->dev;
|
|
dma_dev = &pdev->dev;
|
|
|
|
|
|
|
|
+ bus_set_iommu(&platform_bus_type, &rk_iommu_ops);
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
err_remove_sysfs:
|
|
err_remove_sysfs:
|
|
iommu_device_sysfs_remove(&iommu->iommu);
|
|
iommu_device_sysfs_remove(&iommu->iommu);
|
|
@@ -1176,19 +1178,6 @@ static struct platform_driver rk_iommu_driver = {
|
|
|
|
|
|
static int __init rk_iommu_init(void)
|
|
static int __init rk_iommu_init(void)
|
|
{
|
|
{
|
|
- struct device_node *np;
|
|
|
|
- int ret;
|
|
|
|
-
|
|
|
|
- np = of_find_matching_node(NULL, rk_iommu_dt_ids);
|
|
|
|
- if (!np)
|
|
|
|
- return 0;
|
|
|
|
-
|
|
|
|
- of_node_put(np);
|
|
|
|
-
|
|
|
|
- ret = bus_set_iommu(&platform_bus_type, &rk_iommu_ops);
|
|
|
|
- if (ret)
|
|
|
|
- return ret;
|
|
|
|
-
|
|
|
|
return platform_driver_register(&rk_iommu_driver);
|
|
return platform_driver_register(&rk_iommu_driver);
|
|
}
|
|
}
|
|
subsys_initcall(rk_iommu_init);
|
|
subsys_initcall(rk_iommu_init);
|