Skip to contentSkip to conversation

arm: imx: clk: correct arm clock usecount

PATCH New Anson Huang 2 participants 2 messages Nov 15, 2013

Subsystems (3)
lore
Share & tools
lore
#1 lore raw

PATCH 1/1 arm: imx: clk: correct arm clock usecount

In reply to Anson Huang
Quoted 5 lines · Anson Huang

ARM clock is sourcing from pll1_sw, and pll1_sw can be either from pll1_sys or step, so we should enable arm clock during clock initialization instead of pll1_sys, otherwise, arm clock's usecount would be incorrect and PLL1 will never be disabled even it is not used.

Yea, makes sense.

Quoted 5 lines

And, currently ARM clock is hold be twd clock, but if using "nosmp" , twd will not be used, that will cause arm clock's usecount to be 0, and pll1_sw will be disabled, system will hang if we enable cpufreq which will make pll1_sw source from pll2_pfd2 when arm running at 396M.

It seems that the upstream kernel does not hang in the current circumstance. So I just dropped above text and applied patch.

Shawn

Quoted 23 lines
---
 arch/arm/mach-imx/clk-imx6q.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/clk-imx6q.c +1 -1
index d756d91..133feff 100644
@@ -114,7 +114,7 @@ static struct clk *clk[clk_max];
 static struct clk_onecell_data clk_data;
 
 static enum mx6q_clks const clks_init_on[] __initconst = {
-	mmdc_ch0_axi, rom, pll1_sys,
+	mmdc_ch0_axi, rom, arm,
 };
 
 static struct clk_div_table clk_enet_ref_table[] = {
Signature · 1 line
1.7.9.5
#0 lore raw

PATCH 1/1 arm: imx: clk: correct arm clock usecount

ARM clock is sourcing from pll1_sw, and pll1_sw can be either from pll1_sys or step, so we should enable arm clock during clock initialization instead of pll1_sys, otherwise, arm clock's usecount would be incorrect and PLL1 will never be disabled even it is not used.

And, currently ARM clock is hold be twd clock, but if using "nosmp" , twd will not be used, that will cause arm clock's usecount to be 0, and pll1_sw will be disabled, system will hang if we enable cpufreq which will make pll1_sw source from pll2_pfd2 when arm running at 396M.

---
 arch/arm/mach-imx/clk-imx6q.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/clk-imx6q.c +1 -1
index d756d91..133feff 100644
@@ -114,7 +114,7 @@ static struct clk *clk[clk_max];
 static struct clk_onecell_data clk_data;
 
 static enum mx6q_clks const clks_init_on[] __initconst = {
-	mmdc_ch0_axi, rom, pll1_sys,
+	mmdc_ch0_axi, rom, arm,
 };
 
 static struct clk_div_table clk_enet_ref_table[] = {
Signature · 1 line
1.7.9.5