Signed-off-by: 陈亮 <cl@rock-chips.com>
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 */
#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