rk312x: pmu reset by second global soft reset
author陈亮 <cl@rock-chips.com>
Tue, 26 Aug 2014 06:12:02 +0000 (23:12 -0700)
committer陈亮 <cl@rock-chips.com>
Tue, 26 Aug 2014 06:12:02 +0000 (23:12 -0700)
Signed-off-by: 陈亮 <cl@rock-chips.com>
arch/arm/mach-rockchip/rk312x.c

index f1b81764a03c51e27a13cda4da444462aabbacaf..fd5bf182b80f9a375bd4279cb36f9bf6c27ca79b 100755 (executable)
@@ -104,10 +104,18 @@ static void usb_uart_init(void)
 
 static void __init rk312x_dt_map_io(void)
 {
+       u32 v;
+
        iotable_init(rk312x_io_desc, ARRAY_SIZE(rk312x_io_desc));
        debug_ll_io_init();
        usb_uart_init();
 
+       /* pmu reset by second global soft reset */
+       v = readl_relaxed(RK_CRU_VIRT + RK312X_CRU_GLB_CNT_TH);
+       v &= ~(3 << 12);
+       v |= 1 << 12;
+       writel_relaxed(v, RK_CRU_VIRT + RK312X_CRU_GLB_CNT_TH);
+
        /* enable timer5 for core */
        writel_relaxed(0, RK312X_TIMER5_VIRT + 0x10);
        dsb();
@@ -349,7 +357,7 @@ static void rk312x_restart(char mode, const char *cmd)
        dsb();
 
        /* pll enter slow mode */
-       writel_relaxed(0x30110000, RK_CRU_VIRT + RK312X_CRU_MODE_CON);
+       writel_relaxed(0x11010000, RK_CRU_VIRT + RK312X_CRU_MODE_CON);
        dsb();
        writel_relaxed(0xeca8, RK_CRU_VIRT + RK312X_CRU_GLB_SRST_SND_VALUE);
        dsb();