]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00151891: MX50-Fix bug in exit from LPAPM mode.
authorRanjani Vaidyanathan <ra5478@freescale.com>
Tue, 21 Jun 2011 17:54:09 +0000 (12:54 -0500)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:09:10 +0000 (14:09 +0200)
When exiting from LPAPM mode, ARM clock is run at 266.67MHZ for
a few instructions while the voltage is still at 0.85V.
Fix this issue by setting the ARM-PODF divider before
switching the parent.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
arch/arm/mach-mx5/bus_freq.c

index c94cf55ae5fff1f55646b467f28dfe0e70d65230..b5d151e49e6f7419f0c40f80d70301f150c0735b 100755 (executable)
@@ -498,10 +498,12 @@ void exit_lpapm_mode_mx50(int high_bus_freq)
                __raw_writel(0x02, MXC_CCM_CACRR);
 
                clk_set_rate(pll1, cpu_op_tbl[0].pll_rate);
-               clk_set_parent(pll1_sw_clk, pll1);
 
-               /* Set the divider to ARM_PODF to 5. */
+               /* Set the divider to ARM_PODF to 5 before
+                 * switching the parent.
+                 */
                __raw_writel(0x4, MXC_CCM_CACRR);
+               clk_set_parent(pll1_sw_clk, pll1);
        }
 
        if (!completion_done(&voltage_change_cmpl))