From: Anson Huang Date: Tue, 19 Jun 2012 10:23:10 +0000 (+0800) Subject: ENGR00214199 [MX6]Need to lower ipg_perclk to 6M before init GPT X-Git-Tag: v3.0.35-fsl~886 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e84fc611d8cf0467a00ce7d46df72735f8751373;p=karo-tx-linux.git ENGR00214199 [MX6]Need to lower ipg_perclk to 6M before init GPT As Arik TO1.0 GPT use ipg_perclk as clock source, we need to lower it to 6M before init GPT, or the clock source freq will be wrong if we lower the ipg_perclk after GPT time already init. Signed-off-by: Anson Huang --- diff --git a/arch/arm/mach-mx6/clock.c b/arch/arm/mach-mx6/clock.c index 975f22cc2263..81456655032e 100644 --- a/arch/arm/mach-mx6/clock.c +++ b/arch/arm/mach-mx6/clock.c @@ -5275,6 +5275,9 @@ int __init mx6_clocks_init(unsigned long ckil, unsigned long osc, clk_debug_register(lookups[i].clk); } + /* Lower the ipg_perclk frequency to 6MHz. */ + clk_set_rate(&ipg_perclk, 6000000); + /* Timer needs to be initialized first as the * the WAIT routines use GPT counter as * a delay. @@ -5421,9 +5424,6 @@ int __init mx6_clocks_init(unsigned long ckil, unsigned long osc, __raw_writel(0, MXC_CCM_CCGR6); - /* Lower the ipg_perclk frequency to 6MHz. */ - clk_set_rate(&ipg_perclk, 6000000); - /* S/PDIF */ clk_set_parent(&spdif0_clk[0], &pll3_pfd_454M);