Re: [PATCH 05/19] clk: samsung: exynos5433: Add clocks for CMU_G2D domain

2014-12-08 Thread Pankaj Dubey

Hi Chanwoo,

On Tuesday 02 December 2014 02:19 PM, Chanwoo Choi wrote:

This patch adds ths mux/divider/gate clocksof CMU_G2D domain which includes


nit: %s/clocksof/clocks of


G2D/MDMA IPs. The CMU_G2D must need the clocks related to G2D by providing
CMU_TOP domain. So, this patch add several clocks for G2D from CMU_TOP domain.

Cc: Sylwester Nawrocki s.nawro...@samsung.com
Cc: Tomasz Figa tomasz.f...@gmail.com
Signed-off-by: Chanwoo Choi cw00.c...@samsung.com
Acked-by: Inki Dae inki@samsung.com
Acked-by: Geunsik Lim geunsik@samsung.com
---
  .../devicetree/bindings/clock/exynos5433-clock.txt |   8 ++
  drivers/clk/samsung/clk-exynos5433.c   | 144 +
  include/dt-bindings/clock/exynos5433.h |  42 +-
  3 files changed, 193 insertions(+), 1 deletion(-)



Verified all changes in clock file against UM I have with me, all 
changes are OK.


With small nit in commit message feel free to add:

Reviewed-by: Pankaj Dubey pankaj.du...@samsung.com

Thanks,
Pankaj Dubey
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 05/19] clk: samsung: exynos5433: Add clocks for CMU_G2D domain

2014-12-08 Thread Chanwoo Choi
Hi Pankaj,

On 12/08/2014 08:36 PM, Pankaj Dubey wrote:
 Hi Chanwoo,
 
 On Tuesday 02 December 2014 02:19 PM, Chanwoo Choi wrote:
 This patch adds ths mux/divider/gate clocksof CMU_G2D domain which includes
 
 nit: %s/clocksof/clocks of

I'll fix it.

 
 G2D/MDMA IPs. The CMU_G2D must need the clocks related to G2D by providing
 CMU_TOP domain. So, this patch add several clocks for G2D from CMU_TOP 
 domain.

 Cc: Sylwester Nawrocki s.nawro...@samsung.com
 Cc: Tomasz Figa tomasz.f...@gmail.com
 Signed-off-by: Chanwoo Choi cw00.c...@samsung.com
 Acked-by: Inki Dae inki@samsung.com
 Acked-by: Geunsik Lim geunsik@samsung.com
 ---
   .../devicetree/bindings/clock/exynos5433-clock.txt |   8 ++
   drivers/clk/samsung/clk-exynos5433.c   | 144 
 +
   include/dt-bindings/clock/exynos5433.h |  42 +-
   3 files changed, 193 insertions(+), 1 deletion(-)

 
 Verified all changes in clock file against UM I have with me, all changes are 
 OK.
 
 With small nit in commit message feel free to add:
 
 Reviewed-by: Pankaj Dubey pankaj.du...@samsung.com

Thanks for your review.

Best Regards,
Chanwoo Choi


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 05/19] clk: samsung: exynos5433: Add clocks for CMU_G2D domain

2014-12-02 Thread Chanwoo Choi
This patch adds ths mux/divider/gate clocksof CMU_G2D domain which includes
G2D/MDMA IPs. The CMU_G2D must need the clocks related to G2D by providing
CMU_TOP domain. So, this patch add several clocks for G2D from CMU_TOP domain.

Cc: Sylwester Nawrocki s.nawro...@samsung.com
Cc: Tomasz Figa tomasz.f...@gmail.com
Signed-off-by: Chanwoo Choi cw00.c...@samsung.com
Acked-by: Inki Dae inki@samsung.com
Acked-by: Geunsik Lim geunsik@samsung.com
---
 .../devicetree/bindings/clock/exynos5433-clock.txt |   8 ++
 drivers/clk/samsung/clk-exynos5433.c   | 144 +
 include/dt-bindings/clock/exynos5433.h |  42 +-
 3 files changed, 193 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/clock/exynos5433-clock.txt 
b/Documentation/devicetree/bindings/clock/exynos5433-clock.txt
index 72cd0ba..27dd77b 100644
--- a/Documentation/devicetree/bindings/clock/exynos5433-clock.txt
+++ b/Documentation/devicetree/bindings/clock/exynos5433-clock.txt
@@ -19,6 +19,8 @@ Required Properties:
 which generates clocks for PMU/TMU/MCT/WDT/RTC/SECKEY/TZPC IPs.
   - samsung,exynos5433-cmu-fsys  - clock controller compatible for CMU_FSYS
 which generates clocks for USB/UFS/SDMMC/TSI/PDMA IPs.
+  - samsung,exynos5433-cmu-g2d   - clock controller compatible for CMU_G2D
+which generates clocks for G2D/MDMA IPs.
 
 - reg: physical base address of the controller and length of memory mapped
   region.
@@ -70,6 +72,12 @@ Example 1: Examples of clock controller nodes are listed 
below.
#clock-cells = 1;
};
 
+   cmu_g2d: clock-controller@0x1246 {
+   compatible = samsung,exynos5433-cmu-g2d;
+   reg = 0x1246 0x0b08;
+   #clock-cells = 1;
+   };
+
 Example 2: UART controller node that consumes the clock generated by the clock
   controller.
 
diff --git a/drivers/clk/samsung/clk-exynos5433.c 
b/drivers/clk/samsung/clk-exynos5433.c
index 7e4612f..4dec9fc 100644
--- a/drivers/clk/samsung/clk-exynos5433.c
+++ b/drivers/clk/samsung/clk-exynos5433.c
@@ -400,6 +400,20 @@ static struct samsung_mux_clock top_mux_clks[] __initdata 
= {
 };
 
 static struct samsung_div_clock top_div_clks[] __initdata = {
+   /* DIV_TOP1 */
+   DIV(CLK_DIV_ACLK_GSCL_111, div_aclk_gscl_111, mout_aclk_gscl_333,
+   DIV_TOP1, 28, 3),
+   DIV(CLK_DIV_ACLK_GSCL_333, div_aclk_gscl_333, mout_aclk_gscl_333,
+   DIV_TOP1, 24, 3),
+   DIV(CLK_DIV_ACLK_HEVC_400, div_aclk_hevc_400, mout_aclk_hevc_400,
+   DIV_TOP1, 20, 3),
+   DIV(CLK_DIV_ACLK_MFC_400, div_aclk_mfc_400, mout_aclk_mfc_400_c,
+   DIV_TOP1, 12, 3),
+   DIV(CLK_DIV_ACLK_G2D_266, div_aclk_g2d_266, mout_bus_pll_user,
+   DIV_TOP1, 8, 3),
+   DIV(CLK_DIV_ACLK_G2D_400, div_aclk_g2d_400, mout_aclk_g2d_400_b,
+   DIV_TOP1, 0, 3),
+
/* DIV_TOP2 */
DIV(CLK_DIV_ACLK_FSYS_200, div_aclk_fsys_200, mout_bus_pll_user,
DIV_TOP2, 0, 3),
@@ -489,6 +503,10 @@ static struct samsung_gate_clock top_gate_clks[] 
__initdata = {
ENABLE_ACLK_TOP, 21, CLK_IGNORE_UNUSED, 0),
GATE(CLK_ACLK_FSYS_200, aclk_fsys_200, div_aclk_fsys_200,
ENABLE_ACLK_TOP, 18, CLK_IGNORE_UNUSED, 0),
+   GATE(CLK_ACLK_G2D_266, aclk_g2d_266, div_aclk_g2d_266,
+   ENABLE_ACLK_TOP, 2, CLK_IGNORE_UNUSED, 0),
+   GATE(CLK_ACLK_G2D_400, aclk_g2d_400, div_aclk_g2d_400,
+   ENABLE_ACLK_TOP, 0, CLK_IGNORE_UNUSED, 0),
 
/* ENABLE_SCLK_TOP_FSYS */
GATE(CLK_SCLK_MMC2_FSYS, sclk_mmc2_fsys, div_sclk_mmc2_b,
@@ -1275,3 +1293,129 @@ static void __init exynos5433_cmu_fsys_init(struct 
device_node *np)
 
 CLK_OF_DECLARE(exynos5433_cmu_fsys, samsung,exynos5433-cmu-fsys,
exynos5433_cmu_fsys_init);
+
+/*
+ * Register offset definitions for CMU_G2D
+ */
+#define MUX_SEL_G2D0   0x0200
+#define MUX_SEL_ENABLE_G2D00x0300
+#define MUX_SEL_STAT_G2D0  0x0400
+#define DIV_G2D0x0600
+#define DIV_STAT_G2D   0x0700
+#define DIV_ENABLE_ACLK_G2D0x0800
+#define DIV_ENABLE_ACLK_G2D_SECURE_SMMU_G2D0x0804
+#define DIV_ENABLE_PCLK_G2D0x0900
+#define DIV_ENABLE_PCLK_G2D_SECURE_SMMU_G2D0x0904
+#define DIV_ENABLE_IP_G2D0 0x0b00
+#define DIV_ENABLE_IP_G2D1 0x0b04
+#define DIV_ENABLE_IP_G2D_SECURE_SMMU_G2D  0x0b08
+
+static unsigned long g2d_clk_regs[] __initdata = {
+   MUX_SEL_G2D0,
+   MUX_SEL_ENABLE_G2D0,
+   MUX_SEL_STAT_G2D0,
+   DIV_G2D,
+   DIV_STAT_G2D,
+   DIV_ENABLE_ACLK_G2D,
+   DIV_ENABLE_ACLK_G2D_SECURE_SMMU_G2D,
+   DIV_ENABLE_PCLK_G2D,
+