rk29: boot mode better support recovery by parse command line
author黄涛 <huangtao@rock-chips.com>
Tue, 13 Dec 2011 04:11:43 +0000 (12:11 +0800)
committer黄涛 <huangtao@rock-chips.com>
Tue, 13 Dec 2011 04:11:43 +0000 (12:11 +0800)
arch/arm/mach-rk29/devices.c

index 264a6373681688677ea3aeae073092f064dd74aa..68aaac401ae41f941532785270d52596aec4e45d 100644 (file)
@@ -859,11 +859,13 @@ static int __init boot_mode_init(char *s)
 }
 __setup("androidboot.mode=", boot_mode_init);
 
-void rk29_boot_mode_init_by_register(void)
+__init void rk29_boot_mode_init_by_register(void)
 {
        u32 flag = readl(RK29_TIMER0_BASE);
        if (flag == (SYS_KERNRL_REBOOT_FLAG | BOOT_RECOVER)) {
                boot_mode = BOOT_MODE_RECOVERY;
+       } else if (strstr(boot_command_line, "(parameter)")) {
+               boot_mode = BOOT_MODE_RECOVERY;
        } else {
                boot_mode = readl(RK29_GRF_BASE + 0xdc); // GRF_OS_REG3
        }