]> git.karo-electronics.de Git - linux-beck.git/commitdiff
clk: pistachio: correct critical clock list
authorDamien.Horsley <Damien.Horsley@imgtec.com>
Wed, 26 Aug 2015 16:11:40 +0000 (17:11 +0100)
committerStephen Boyd <sboyd@codeaurora.org>
Wed, 26 Aug 2015 18:34:43 +0000 (11:34 -0700)
Current critical clock list for pistachio enables
only mips and sys clocks by default but there are
also other clocks that are not claimed by anyone and
needs to be enabled by default.

This patch updates the critical clocks that need
to be enabled by default.

Add a separate struct to distinguish the critical clocks
as listed:
1.) core clocks:
a.) mips clock
2.) peripheral system clocks:
a.) sys clock
b.) sys_bus clock
c.) DDR clock
d.) ROM clock

Fixes: b35d7c33419c("CLK: Pistachio: Register core clocks")
Cc: <stable@vger.kernel.org> # 4.1
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
Signed-off-by: Damien.Horsley <Damien.Horsley@imgtec.com>
Signed-off-by: Govindraj Raja <govindraj.raja@imgtec.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/pistachio/clk-pistachio.c

index 8c0fe8828f9938d8e6491e430c33154cdcda3565..c4ceb5eaf46c16d281f8ce1c3e6334262a2db083 100644 (file)
@@ -159,9 +159,15 @@ PNAME(mux_debug) = { "mips_pll_mux", "rpu_v_pll_mux",
                     "wifi_pll_mux", "bt_pll_mux" };
 static u32 mux_debug_idx[] = { 0x0, 0x1, 0x2, 0x4, 0x8, 0x10 };
 
-static unsigned int pistachio_critical_clks[] __initdata = {
-       CLK_MIPS,
-       CLK_PERIPH_SYS,
+static unsigned int pistachio_critical_clks_core[] __initdata = {
+       CLK_MIPS
+};
+
+static unsigned int pistachio_critical_clks_sys[] __initdata = {
+       PERIPH_CLK_SYS,
+       PERIPH_CLK_SYS_BUS,
+       PERIPH_CLK_DDR,
+       PERIPH_CLK_ROM,
 };
 
 static void __init pistachio_clk_init(struct device_node *np)
@@ -193,8 +199,8 @@ static void __init pistachio_clk_init(struct device_node *np)
 
        pistachio_clk_register_provider(p);
 
-       pistachio_clk_force_enable(p, pistachio_critical_clks,
-                                  ARRAY_SIZE(pistachio_critical_clks));
+       pistachio_clk_force_enable(p, pistachio_critical_clks_core,
+                                  ARRAY_SIZE(pistachio_critical_clks_core));
 }
 CLK_OF_DECLARE(pistachio_clk, "img,pistachio-clk", pistachio_clk_init);
 
@@ -261,6 +267,9 @@ static void __init pistachio_clk_periph_init(struct device_node *np)
                                    ARRAY_SIZE(pistachio_periph_gates));
 
        pistachio_clk_register_provider(p);
+
+       pistachio_clk_force_enable(p, pistachio_critical_clks_sys,
+                                  ARRAY_SIZE(pistachio_critical_clks_sys));
 }
 CLK_OF_DECLARE(pistachio_clk_periph, "img,pistachio-clk-periph",
               pistachio_clk_periph_init);