[9610] iommu: Added power domain registration on each sysmmu.
authoryi jaeuk <ju.yi@samsung.com>
Fri, 18 May 2018 07:56:03 +0000 (16:56 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:26:17 +0000 (17:26 +0900)
Change-Id: If8173a68177ed0e237d0bea383e5484fe8fea6a4
Signed-off-by: yi jaeuk <ju.yi@samsung.com>
arch/arm64/boot/dts/exynos/exynos9610-sysmmu.dtsi
drivers/iommu/exynos-iommu.c

index 3ea26dd1ad6986a6ede078ece0fd34ddf8f1b717..a6035572fc6e57f411b1f5b0ed1b646ef3ce9e3f 100644 (file)
@@ -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 {
                        <(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 {
                        <(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 {
                        <(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 {
                        <(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 {
                        <(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 {
                sysmmu,tlb_property =
                        <(SYSMMU_PORT_NO_PREFETCH_READ(0x0) | SYSMMU_BL1) SYSMMU_NOID>;
                #iommu-cells = <0>;
+               samsung,power-domain = <&pd_dispaud>;
        };
 };
index bdc86e9c8c73cf55107e3e99688edb47a1b17dbc..d30fd4eb6b05133d72401b2dcb64c572c9c1ef67 100644 (file)
@@ -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);