RK3168:restore clk_cpu:aclk_cpu to default value for RK3168 reboot
authorcym <cym@rock-chips.com>
Thu, 28 Mar 2013 02:18:20 +0000 (10:18 +0800)
committercym <cym@rock-chips.com>
Thu, 28 Mar 2013 02:18:20 +0000 (10:18 +0800)
arch/arm/mach-rk30/reset.c

index d86811c21d134b074f0da2a718050a5f4452086c..f897f7849450b8782549e98af4060738691248c2 100644 (file)
@@ -27,8 +27,14 @@ static void rk30_arch_reset(char mode, const char *cmd)
        writel_relaxed(boot_flag, RK30_PMU_BASE + PMU_SYS_REG0);        // for loader
        writel_relaxed(boot_mode, RK30_PMU_BASE + PMU_SYS_REG1);        // for linux
        dsb();
-       /* disable remap */
-       writel_relaxed(1 << (12 + 16), RK30_GRF_BASE + GRF_SOC_CON0);
+
+       /* restore clk_cpu:aclk_cpu to default value for RK3168 */
+#if defined(CONFIG_ARCH_RK3066B)
+       writel_relaxed(0x00070001 , RK30_CRU_BASE + CRU_CLKSELS_CON(1));
+#endif
+
+        /* disable remap */
+        writel_relaxed(1 << (12 + 16), RK30_GRF_BASE + GRF_SOC_CON0);
        /* pll enter slow mode */
        writel_relaxed(PLL_MODE_SLOW(APLL_ID) | PLL_MODE_SLOW(CPLL_ID) | PLL_MODE_SLOW(GPLL_ID), RK30_CRU_BASE + CRU_MODE_CON);
        dsb();