From 4dbb263b5b5654620edebbe2e7b0c086e1ec693b Mon Sep 17 00:00:00 2001 From: yi jaeuk Date: Fri, 18 May 2018 16:56:03 +0900 Subject: [PATCH] [9610] iommu: Added power domain registration on each sysmmu. Change-Id: If8173a68177ed0e237d0bea383e5484fe8fea6a4 Signed-off-by: yi jaeuk --- arch/arm64/boot/dts/exynos/exynos9610-sysmmu.dtsi | 10 ++++++++++ drivers/iommu/exynos-iommu.c | 11 +---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/exynos/exynos9610-sysmmu.dtsi b/arch/arm64/boot/dts/exynos/exynos9610-sysmmu.dtsi index 3ea26dd1ad69..a6035572fc6e 100644 --- a/arch/arm64/boot/dts/exynos/exynos9610-sysmmu.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos9610-sysmmu.dtsi @@ -32,6 +32,7 @@ sysmmu,tlb_property = <(SYSMMU_PORT_NO_PREFETCH_READ(0x0) | SYSMMU_BL8) SYSMMU_NOID>; #iommu-cells = <0>; + samsung,power-domain = <&pd_vipx2>; }; sysmmu_vipx2: sysmmu@10E50000 { @@ -48,6 +49,7 @@ sysmmu,tlb_property = <(SYSMMU_PORT_NO_PREFETCH_READ(0x0) | SYSMMU_BL8) SYSMMU_NOID>; #iommu-cells = <0>; + samsung,power-domain = <&pd_vipx2>; }; sysmmu_mfc0: sysmmu@12C70000 { @@ -64,6 +66,7 @@ sysmmu,tlb_property = <(SYSMMU_PORT_NO_PREFETCH_READ(0x0) | SYSMMU_BL8) SYSMMU_NOID>; #iommu-cells = <0>; + samsung,power-domain = <&pd_mfc>; }; sysmmu_mfc1: sysmmu@12C90000 { @@ -81,6 +84,7 @@ <(SYSMMU_PORT_NO_PREFETCH_READ(0x0) | SYSMMU_BL8) SYSMMU_NOID>, <(SYSMMU_PORT_NO_PREFETCH_READWRITE(0x1) | SYSMMU_BL2) SYSMMU_ID_MASK(0x1, 0x1)>; #iommu-cells = <0>; + samsung,power-domain = <&pd_mfc>; }; sysmmu_g2d: sysmmu@12E70000 { @@ -99,6 +103,7 @@ <(SYSMMU_PORT_NO_PREFETCH_READ(0x1) | SYSMMU_BL32) SYSMMU_ID_MASK(0x1, 0x3)>, <(SYSMMU_PORT_PREFETCH_PREDICTION_READ(0x1) | SYSMMU_BL8) SYSMMU_ID_MASK(0x2, 0x3)>; #iommu-cells = <0>; + samsung,power-domain = <&pd_g2d>; }; sysmmu_cam: sysmmu@14550000 { @@ -148,6 +153,7 @@ <(SYSMMU_PORT_PREFETCH_PREDICTION_WRITE(0x1) | SYSMMU_BL1) SYSMMU_ID_MASK(0x19, 0x1F)>, <(SYSMMU_PORT_PREFETCH_PREDICTION_WRITE(0x1) | SYSMMU_BL1) SYSMMU_ID_MASK(0x1B, 0x1F)>; #iommu-cells = <0>; + samsung,power-domain = <&pd_cam>; }; sysmmu_isp0: sysmmu@14740000 { @@ -179,6 +185,7 @@ <(SYSMMU_PORT_PREFETCH_PREDICTION_WRITE(0x1) | SYSMMU_BL32) SYSMMU_ID_MASK(0x2, 0x7)>, <(SYSMMU_PORT_PREFETCH_PREDICTION_WRITE(0x1) | SYSMMU_BL32) SYSMMU_ID_MASK(0x6, 0x7)>; #iommu-cells = <0>; + samsung,power-domain = <&pd_isp>; }; sysmmu_isp1: sysmmu@14770000 { @@ -230,6 +237,7 @@ <(SYSMMU_PORT_PREFETCH_PREDICTION_WRITE(0x1) | SYSMMU_BL1) SYSMMU_ID_MASK(0x21, 0x3F)>, <(SYSMMU_PORT_PREFETCH_PREDICTION_WRITE(0x1) | SYSMMU_BL1) SYSMMU_ID_MASK(0x22, 0x3F)>; #iommu-cells = <0>; + samsung,power-domain = <&pd_isp>; }; sysmmu_dpu: sysmmu@14820000 { @@ -254,6 +262,7 @@ <(SYSMMU_PORT_PREFETCH_PREDICTION_READ(0x1) | SYSMMU_BL1) SYSMMU_ID_MASK(0x16, 0x1F)>, <(SYSMMU_PORT_PREFETCH_PREDICTION_READ(0x1) | SYSMMU_BL1) SYSMMU_ID_MASK(0x17, 0x1F)>; #iommu-cells = <0>; + samsung,power-domain = <&pd_dispaud>; }; sysmmu_abox: sysmmu@14920000 { @@ -269,5 +278,6 @@ sysmmu,tlb_property = <(SYSMMU_PORT_NO_PREFETCH_READ(0x0) | SYSMMU_BL1) SYSMMU_NOID>; #iommu-cells = <0>; + samsung,power-domain = <&pd_dispaud>; }; }; diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index bdc86e9c8c73..d30fd4eb6b05 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -197,15 +197,8 @@ static irqreturn_t exynos_sysmmu_irq(int irq, void *dev_id) static int sysmmu_get_hw_info(struct sysmmu_drvdata *data) { - int ret; struct tlb_props *tlb_props = &data->tlb_props; - ret = pm_runtime_get_sync(data->sysmmu); - if (ret < 0) { - dev_err(data->sysmmu, "Failed to runtime pm get(%d)\n", ret); - return ret; - } - data->version = __sysmmu_get_hw_version(data); /* @@ -217,8 +210,6 @@ static int sysmmu_get_hw_info(struct sysmmu_drvdata *data) else if (__sysmmu_get_capa_type(data) == 0) tlb_props->flags |= TLB_TYPE_PORT; - pm_runtime_put(data->sysmmu); - return 0; } @@ -1474,7 +1465,7 @@ err_reg_driver: kmem_cache_destroy(lv2table_kmem_cache); return ret; } -core_initcall(exynos_iommu_init); +subsys_initcall_sync(exynos_iommu_init); IOMMU_OF_DECLARE(exynos_iommu_of, "samsung,exynos-sysmmu", NULL); -- 2.20.1