arm: imx: clk: correct arm clock usecount
Subsystems (3)
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
@@ -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
PATCH 1/1 arm: imx: clk: correct arm clock usecount
Quoted 5 lines · Anson Huang
ARM clock is sourcing from
pll1_sw, andpll1_swcan be either frompll1_sysor step, so we should enable arm clock during clock initialization instead ofpll1_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_swwill be disabled, system will hang if we enable cpufreq which will makepll1_swsource frompll2_pfd2when 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
Signed-off-by Anson Huang <[email protected]>--- arch/arm/mach-imx/clk-imx6q.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-imx/clk-imx6q.c +1
-1@@ -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