static void __init rk3036_boot_mode_init(void) { u32 flag = readl_relaxed(RK_GRF_VIRT + RK3036_GRF_OS_REG4); u32 mode = readl_relaxed(RK_GRF_VIRT + RK3036_GRF_OS_REG5); u32 rst_st = readl_relaxed(RK_CRU_VIRT + RK3036_CRU_RST_ST); if (flag == (SYS_KERNRL_REBOOT_FLAG | BOOT_RECOVER)) mode = BOOT_MODE_RECOVERY; if (rst_st & ((1 << 2) | (1 << 3))) mode = BOOT_MODE_WATCHDOG; rockchip_boot_mode_init(flag, mode); }
static void __init rk3188_boot_mode_init(void) { u32 flag = readl_relaxed(RK_PMU_VIRT + RK3188_PMU_SYS_REG0); u32 mode = readl_relaxed(RK_PMU_VIRT + RK3188_PMU_SYS_REG1); if (flag == (SYS_KERNRL_REBOOT_FLAG | BOOT_RECOVER)) { mode = BOOT_MODE_RECOVERY; } rockchip_boot_mode_init(flag, mode); #ifdef CONFIG_RK29_WATCHDOG writel_relaxed(BOOT_MODE_WATCHDOG, RK_PMU_VIRT + RK3188_PMU_SYS_REG1); #endif }
static void __init rk3288_boot_mode_init(void) { u32 flag = readl_relaxed(RK_PMU_VIRT + RK3288_PMU_SYS_REG0); u32 mode = readl_relaxed(RK_PMU_VIRT + RK3288_PMU_SYS_REG1); u32 rst_st = readl_relaxed(RK_CRU_VIRT + RK3288_CRU_GLB_RST_ST); if (flag == (SYS_KERNRL_REBOOT_FLAG | BOOT_RECOVER)) mode = BOOT_MODE_RECOVERY; if (rst_st & ((1 << 4) | (1 << 5))) mode = BOOT_MODE_WATCHDOG; else if (rst_st & ((1 << 2) | (1 << 3))) mode = BOOT_MODE_TSADC; rockchip_boot_mode_init(flag, mode); }