]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00214199 [MX6]Need to lower ipg_perclk to 6M before init GPT
authorAnson Huang <b20788@freescale.com>
Tue, 19 Jun 2012 10:23:10 +0000 (18:23 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:50 +0000 (08:34 +0200)
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 <b20788@freescale.com>
arch/arm/mach-mx6/clock.c

index 975f22cc22632202abd541628620d5e58c968057..81456655032e1fab885964434f37d3379b6475a8 100644 (file)
@@ -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);