rk312x: fix reboot loader fail
author陈亮 <cl@rock-chips.com>
Tue, 19 Aug 2014 10:53:45 +0000 (03:53 -0700)
committer陈亮 <cl@rock-chips.com>
Tue, 19 Aug 2014 10:53:45 +0000 (03:53 -0700)
Signed-off-by: 陈亮 <cl@rock-chips.com>
arch/arm/mach-rockchip/rk312x.c
include/linux/rockchip/pmu.h

index 4286771c5a2fcb61fc9be2af73d75a7b392cf7dc..c87792980e69d8cc3e59417a7158328631f42777 100755 (executable)
@@ -338,8 +338,11 @@ static void rk312x_restart(char mode, const char *cmd)
 
        rockchip_restart_get_boot_mode(cmd, &boot_flag, &boot_mode);
 
-       writel_relaxed(boot_flag, RK_GRF_VIRT + RK312X_GRF_OS_REG4);
-       writel_relaxed(boot_mode, RK_GRF_VIRT + RK312X_GRF_OS_REG5);
+       /* for loader */
+       writel_relaxed(boot_flag, RK_PMU_VIRT + RK312x_PMU_SYS_REG0);
+       /* for linux */
+       writel_relaxed(boot_mode, RK_PMU_VIRT + RK312x_PMU_SYS_REG1);
+
        dsb();
 
        /* pll enter slow mode */
index 02f379c929f8b0b611db397229e2a4202883a28d..9f39950ea5193e69d0613a31c848e2295600766a 100755 (executable)
@@ -1,6 +1,9 @@
 #ifndef __MACH_ROCKCHIP_PMU_H
 #define __MACH_ROCKCHIP_PMU_H
 
+#define RK312x_PMU_SYS_REG0             0x38
+#define RK312x_PMU_SYS_REG1             0x3c
+
 #define RK3188_PMU_WAKEUP_CFG0          0x00
 #define RK3188_PMU_WAKEUP_CFG1          0x04
 #define RK3188_PMU_PWRDN_CON            0x08