Skip to contentSkip to conversation

clk: exynos: add gate clock descriptions of System MMU

PATCH Superseded Cho KyongHo 3 participants 4 messages Aug 8, 2013 – Aug 9, 2013

Subsystems (4)

v9 of 11 Superseded Latest is v11 →

lore
Share & tools
lore
#0 lore raw

PATCH v9 5/16 clk: exynos: add gate clock descriptions of System MMU

This adds gate clocks of all System MMUs and their master IPs that are not apeared in clk-exynos5250.c
Also fixes GATE_IP_ACP to 0x18800 and changed GATE_DA to GATE for System MMU clocks in clk-exynos4.c

---
 .../devicetree/bindings/clock/exynos5250-clock.txt |   26 +++++++++
 drivers/clk/samsung/clk-exynos4.c                  |   27 +++------
 drivers/clk/samsung/clk-exynos5250.c               |   57 ++++++++++++++++----
 3 files changed, 82 insertions(+), 28 deletions(-)
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/clock/exynos5250-clock.txt index 24765c1..9c76710 100644

Documentation/devicetree/bindings/clock/exynos5250-clock.txt +26 -0
@@ -159,6 +159,32 @@ clock which they consume.
   mixer			343
   hdmi			344
   g2d			345
+  smmu_fimc_lite0	346
+  smmu_fimc_lite1	347
+  smmu_fimc_lite2	348
+  smmu_tv		349
+  smmu_fimd1		350
+  smmu_2d		351
+  fimc_isp		352
+  fimc_drc		353
+  fimc_fd		354
+  fimc_scc		355
+  fimc_scp		356
+  fimc_mcuctl		357
+  fimc_odc		358
+  fimc_dis		359
+  fimc_3dnr		360
+  smmu_fimc_isp		361
+  smmu_fimc_drc		362
+  smmu_fimc_fd		363
+  smmu_fimc_scc		364
+  smmu_fimc_scp		365
+  smmu_fimc_mcuctl	366
+  smmu_fimc_odc		367
+  smmu_fimc_dis0	368
+  smmu_fimc_dis1	369
+  smmu_fimc_3dnr	370
+  camif_top		371
 
 
    [Clock Muxes]
drivers/clk/samsung/clk-exynos4.c +9 -18
index 68f9a4a..92dcf03 100644
@@ -705,29 +705,20 @@ static struct samsung_gate_clock exynos4_gate_clks[] __initdata = {
 			GATE_IP_CAM, 4, 0, 0, "fimc"),
 	GATE_DA(csis1, "s5p-mipi-csis.1", "csis1", "aclk160",
 			GATE_IP_CAM, 5, 0, 0, "fimc"),
-	GATE_DA(smmu_fimc0, "exynos-sysmmu.5", "smmu_fimc0", "aclk160",
-			GATE_IP_CAM, 7, 0, 0, "sysmmu"),
-	GATE_DA(smmu_fimc1, "exynos-sysmmu.6", "smmu_fimc1", "aclk160",
-			GATE_IP_CAM, 8, 0, 0, "sysmmu"),
-	GATE_DA(smmu_fimc2, "exynos-sysmmu.7", "smmu_fimc2", "aclk160",
-			GATE_IP_CAM, 9, 0, 0, "sysmmu"),
-	GATE_DA(smmu_fimc3, "exynos-sysmmu.8", "smmu_fimc3", "aclk160",
-			GATE_IP_CAM, 10, 0, 0, "sysmmu"),
-	GATE_DA(smmu_jpeg, "exynos-sysmmu.3", "smmu_jpeg", "aclk160",
-			GATE_IP_CAM, 11, 0, 0, "sysmmu"),
+	GATE(smmu_fimc0, "smmu_fimc0", "aclk160", GATE_IP_CAM, 7, 0, 0),
+	GATE(smmu_fimc1, "smmu_fimc1", "aclk160", GATE_IP_CAM, 8, 0, 0),
+	GATE(smmu_fimc2, "smmu_fimc2", "aclk160", GATE_IP_CAM, 9, 0, 0),
+	GATE(smmu_fimc3, "smmu_fimc3", "aclk160", GATE_IP_CAM, 10, 0, 0),
+	GATE(smmu_jpeg, "smmu_jpeg", "aclk160", GATE_IP_CAM, 11, 0, 0),
 	GATE(pixelasyncm0, "pxl_async0", "aclk160", GATE_IP_CAM, 17, 0, 0),
 	GATE(pixelasyncm1, "pxl_async1", "aclk160", GATE_IP_CAM, 18, 0, 0),
-	GATE_DA(smmu_tv, "exynos-sysmmu.2", "smmu_tv", "aclk160",
-			GATE_IP_TV, 4, 0, 0, "sysmmu"),
+	GATE(smmu_tv, "smmu_tv", "aclk160", GATE_IP_TV, 4, 0, 0),
 	GATE_DA(mfc, "s5p-mfc", "mfc", "aclk100", GATE_IP_MFC, 0, 0, 0, "mfc"),
-	GATE_DA(smmu_mfcl, "exynos-sysmmu.0", "smmu_mfcl", "aclk100",
-			GATE_IP_MFC, 1, 0, 0, "sysmmu"),
-	GATE_DA(smmu_mfcr, "exynos-sysmmu.1", "smmu_mfcr", "aclk100",
-			GATE_IP_MFC, 2, 0, 0, "sysmmu"),
+	GATE(smmu_mfcl, "smmu_mfcl", "aclk100", GATE_IP_MFC, 1, 0, 0),
+	GATE(smmu_mfcr, "smmu_mfcr", "aclk100", GATE_IP_MFC, 2, 0, 0),
 	GATE_DA(fimd0, "exynos4-fb.0", "fimd0", "aclk160",
 			GATE_IP_LCD0, 0, 0, 0, "fimd"),
-	GATE_DA(smmu_fimd0, "exynos-sysmmu.10", "smmu_fimd0", "aclk160",
-			GATE_IP_LCD0, 4, 0, 0, "sysmmu"),
+	GATE(smmu_fimd0, "smmu_fimd0", "aclk160", GATE_IP_LCD0, 4, 0, 0),
 	GATE_DA(pdma0, "dma-pl330.0", "pdma0", "aclk133",
 			GATE_IP_FSYS, 0, 0, 0, "dma"),
 	GATE_DA(pdma1, "dma-pl330.1", "pdma1", "aclk133",
drivers/clk/samsung/clk-exynos5250.c +47 -10

91 lines not on this page · raw message

Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 11 lines · Cho KyongHo

This adds gate clocks of all System MMUs and their master IPs that are not apeared in clk-exynos5250.c
Also fixes GATE_IP_ACP to 0x18800 and changed GATE_DA to GATE for System MMU clocks in clk-exynos4.c

---
 .../devicetree/bindings/clock/exynos5250-clock.txt |   26 +++++++++
 drivers/clk/samsung/clk-exynos4.c                  |   27 +++------
 drivers/clk/samsung/clk-exynos5250.c               |   57 ++++++++++++++++----
 3 files changed, 82 insertions(+), 28 deletions(-)

[...]

drivers/clk/samsung/clk-exynos5250.c static struct samsung_gate_clock exynos5250_gate_clks[] __initdata = { · line 364

Quoted 12 lines
drivers/clk/samsung/clk-exynos5250.c +4 -4
@@ -349,19 +358,26 @@ static struct samsung_gate_clock exynos5250_gate_clks[] __initdata = {
 	GATE(gscl3, "gscl3", "aclk266", GATE_IP_GSCL, 3, 0, 0),
 	GATE(gscl_wa, "gscl_wa", "div_gscl_wa", GATE_IP_GSCL, 5, 0, 0),
 	GATE(gscl_wb, "gscl_wb", "div_gscl_wb", GATE_IP_GSCL, 6, 0, 0),
-	GATE(smmu_gscl0, "smmu_gscl0", "aclk266", GATE_IP_GSCL, 7, 0, 0),
-	GATE(smmu_gscl1, "smmu_gscl1", "aclk266", GATE_IP_GSCL, 8, 0, 0),
-	GATE(smmu_gscl2, "smmu_gscl2", "aclk266", GATE_IP_GSCL, 9, 0, 0),
-	GATE(smmu_gscl3, "smmu_gscl3", "aclk266", GATE_IP_GSCL, 10, 0, 0),
+	GATE(smmu_gscl0, "smmu_gscl0", "none", GATE_IP_GSCL, 7, 0, 0),
+	GATE(smmu_gscl1, "smmu_gscl1", "none", GATE_IP_GSCL, 8, 0, 0),
+	GATE(smmu_gscl2, "smmu_gscl2", "none", GATE_IP_GSCL, 9, 0, 0),
+	GATE(smmu_gscl3, "smmu_gscl3", "none", GATE_IP_GSCL, 10, 0, 0),

Why are the smmu clocks' parent clocks removed ? Shouldn't both the gscaler gate clock and the gscaler smmu clock be still same, as it is in case of exynos4 ?

#2 lore raw
Quoted 23 lines · On Thursday 08 of August 2013 13:17:34 Sylwester Nawrocki wrote:
Quoted 13 lines · Cho KyongHo

This adds gate clocks of all System MMUs and their master IPs that are not apeared in clk-exynos5250.c
Also fixes GATE_IP_ACP to 0x18800 and changed GATE_DA to GATE for System MMU clocks in clk-exynos4.c

---

 .../devicetree/bindings/clock/exynos5250-clock.txt |   26 +++++++++
 drivers/clk/samsung/clk-exynos4.c                  |   27 +++------
 drivers/clk/samsung/clk-exynos5250.c               |   57

++++++++++++++++---- 3 files changed, 82 insertions(+), 28 deletions(-)

[...]

Quoted 6 lines
(quoted diff) +0 -0
@@ -349,19 +358,26 @@ static struct samsung_gate_clock

exynos5250_gate_clks[] __initdata = {>

drivers/clk/samsung/clk-exynos5250.c +0 -0
 	GATE(gscl3, "gscl3", "aclk266", GATE_IP_GSCL, 3, 0, 0),
 	GATE(gscl_wa, "gscl_wa", "div_gscl_wa", GATE_IP_GSCL, 5, 0, 0),
 	GATE(gscl_wb, "gscl_wb", "div_gscl_wb", GATE_IP_GSCL, 6, 0, 0),
Quoted 12 lines

drivers/clk/samsung/clk-exynos5250.c static struct samsung_gate_clock exynos5250_gate_clks[] __initdata = { · line 364

Quoted 8 lines
drivers/clk/samsung/clk-exynos5250.c +4 -4
-	GATE(smmu_gscl0, "smmu_gscl0", "aclk266", GATE_IP_GSCL, 7, 0, 0),
-	GATE(smmu_gscl1, "smmu_gscl1", "aclk266", GATE_IP_GSCL, 8, 0, 0),
-	GATE(smmu_gscl2, "smmu_gscl2", "aclk266", GATE_IP_GSCL, 9, 0, 0),
-	GATE(smmu_gscl3, "smmu_gscl3", "aclk266", GATE_IP_GSCL, 10, 0, 0),
+	GATE(smmu_gscl0, "smmu_gscl0", "none", GATE_IP_GSCL, 7, 0, 0),
+	GATE(smmu_gscl1, "smmu_gscl1", "none", GATE_IP_GSCL, 8, 0, 0),
+	GATE(smmu_gscl2, "smmu_gscl2", "none", GATE_IP_GSCL, 9, 0, 0),
+	GATE(smmu_gscl3, "smmu_gscl3", "none", GATE_IP_GSCL, 10, 0, 0),

Why are the smmu clocks' parent clocks removed ? Shouldn't both the gscaler gate clock and the gscaler smmu clock be still same, as it is in case of exynos4 ?

I agree with Sylwester.

In fact, it is not a valid clock setup. A valid clock must be either root clock (indicated by appropriate clock flag and specified frequency) or have a valid parent.

Best regards,
Tomasz

#3 lore raw
Quoted 37 lines · Tomasz Figa
Quoted 23 lines · On Thursday 08 of August 2013 13:17:34 Sylwester Nawrocki wrote:
Quoted 13 lines · Cho KyongHo

This adds gate clocks of all System MMUs and their master IPs that are not apeared in clk-exynos5250.c
Also fixes GATE_IP_ACP to 0x18800 and changed GATE_DA to GATE for System MMU clocks in clk-exynos4.c

---

 .../devicetree/bindings/clock/exynos5250-clock.txt |   26 +++++++++
 drivers/clk/samsung/clk-exynos4.c                  |   27 +++------
 drivers/clk/samsung/clk-exynos5250.c               |   57

++++++++++++++++---- 3 files changed, 82 insertions(+), 28 deletions(-)

[...]

Quoted 6 lines
(quoted diff) +0 -0
@@ -349,19 +358,26 @@ static struct samsung_gate_clock

exynos5250_gate_clks[] __initdata = {>

drivers/clk/samsung/clk-exynos5250.c +0 -0
 	GATE(gscl3, "gscl3", "aclk266", GATE_IP_GSCL, 3, 0, 0),
 	GATE(gscl_wa, "gscl_wa", "div_gscl_wa", GATE_IP_GSCL, 5, 0, 0),
 	GATE(gscl_wb, "gscl_wb", "div_gscl_wb", GATE_IP_GSCL, 6, 0, 0),
Quoted 12 lines

drivers/clk/samsung/clk-exynos5250.c static struct samsung_gate_clock exynos5250_gate_clks[] __initdata = { · line 364

Quoted 8 lines
drivers/clk/samsung/clk-exynos5250.c +4 -4
-	GATE(smmu_gscl0, "smmu_gscl0", "aclk266", GATE_IP_GSCL, 7, 0, 0),
-	GATE(smmu_gscl1, "smmu_gscl1", "aclk266", GATE_IP_GSCL, 8, 0, 0),
-	GATE(smmu_gscl2, "smmu_gscl2", "aclk266", GATE_IP_GSCL, 9, 0, 0),
-	GATE(smmu_gscl3, "smmu_gscl3", "aclk266", GATE_IP_GSCL, 10, 0, 0),
+	GATE(smmu_gscl0, "smmu_gscl0", "none", GATE_IP_GSCL, 7, 0, 0),
+	GATE(smmu_gscl1, "smmu_gscl1", "none", GATE_IP_GSCL, 8, 0, 0),
+	GATE(smmu_gscl2, "smmu_gscl2", "none", GATE_IP_GSCL, 9, 0, 0),
+	GATE(smmu_gscl3, "smmu_gscl3", "none", GATE_IP_GSCL, 10, 0, 0),

Why are the smmu clocks' parent clocks removed ? Shouldn't both the gscaler gate clock and the gscaler smmu clock be still same, as it is in case of exynos4 ?

Quoted 6 lines

I agree with Sylwester.

In fact, it is not a valid clock setup. A valid clock must be either root clock (indicated by appropriate clock flag and specified frequency) or have a valid parent.

I thought that it does not require parent clock since it is just a gating clock. Let me check it again.

Thank you.

Quoted 3 lines

Best regards,
Tomasz