Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: pistachio: correct critical clock list

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>

authored by

Damien.Horsley and committed by
Stephen Boyd
d31ff5f7 7937c6c5

+14 -5
+14 -5
drivers/clk/pistachio/clk-pistachio.c
··· 159 159 "wifi_pll_mux", "bt_pll_mux" }; 160 160 static u32 mux_debug_idx[] = { 0x0, 0x1, 0x2, 0x4, 0x8, 0x10 }; 161 161 162 - static unsigned int pistachio_critical_clks[] __initdata = { 163 - CLK_MIPS, 164 - CLK_PERIPH_SYS, 162 + static unsigned int pistachio_critical_clks_core[] __initdata = { 163 + CLK_MIPS 164 + }; 165 + 166 + static unsigned int pistachio_critical_clks_sys[] __initdata = { 167 + PERIPH_CLK_SYS, 168 + PERIPH_CLK_SYS_BUS, 169 + PERIPH_CLK_DDR, 170 + PERIPH_CLK_ROM, 165 171 }; 166 172 167 173 static void __init pistachio_clk_init(struct device_node *np) ··· 199 193 200 194 pistachio_clk_register_provider(p); 201 195 202 - pistachio_clk_force_enable(p, pistachio_critical_clks, 203 - ARRAY_SIZE(pistachio_critical_clks)); 196 + pistachio_clk_force_enable(p, pistachio_critical_clks_core, 197 + ARRAY_SIZE(pistachio_critical_clks_core)); 204 198 } 205 199 CLK_OF_DECLARE(pistachio_clk, "img,pistachio-clk", pistachio_clk_init); 206 200 ··· 267 261 ARRAY_SIZE(pistachio_periph_gates)); 268 262 269 263 pistachio_clk_register_provider(p); 264 + 265 + pistachio_clk_force_enable(p, pistachio_critical_clks_sys, 266 + ARRAY_SIZE(pistachio_critical_clks_sys)); 270 267 } 271 268 CLK_OF_DECLARE(pistachio_clk_periph, "img,pistachio-clk-periph", 272 269 pistachio_clk_periph_init);