[COMMON] iommu/exynos: move pm_runtime_enable() in probe
authorJanghyuck Kim <janghyuck.kim@samsung.com>
Wed, 28 Feb 2018 07:50:28 +0000 (16:50 +0900)
committerEunyoung Lee <ey470.lee@samsung.com>
Wed, 20 Jun 2018 00:20:44 +0000 (09:20 +0900)
Multiple SysMMUs can be the child node of same power domain.
In really_probe(), it tries to disable the power domain after calling
probe() if pm_runtime_suspend() of child node is true.
So calling pm_runtime_enable() before SFR access in sysmmu_probe() would
make external abort because it allows to be powered off.

Change-Id: I3f46b300afc5ca15300561eb4cf55837f29a50ab
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
drivers/iommu/exynos-iommu.c

index d30fd4eb6b05133d72401b2dcb64c572c9c1ef67..0f1c081ebf9c1c5ad13a970863d1da5fca6f1c54 100644 (file)
@@ -529,8 +529,6 @@ static int __init exynos_sysmmu_probe(struct platform_device *pdev)
 
        platform_set_drvdata(pdev, data);
 
-       pm_runtime_enable(dev);
-
        ret = exynos_iommu_init_event_log(SYSMMU_DRVDATA_TO_LOG(data),
                                SYSMMU_LOG_LEN);
        if (!ret)
@@ -567,6 +565,8 @@ static int __init exynos_sysmmu_probe(struct platform_device *pdev)
                return ret;
        }
 
+       pm_runtime_enable(dev);
+
        dev_info(data->sysmmu, "is probed. Version %d.%d.%d\n",
                        MMU_MAJ_VER(data->version),
                        MMU_MIN_VER(data->version),