From 53f0a424f94a21c11af94f84aed790ae32e404bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Tue, 13 Dec 2011 12:11:43 +0800 Subject: [PATCH] rk29: boot mode better support recovery by parse command line --- arch/arm/mach-rk29/devices.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rk29/devices.c b/arch/arm/mach-rk29/devices.c index 264a63736816..68aaac401ae4 100644 --- a/arch/arm/mach-rk29/devices.c +++ b/arch/arm/mach-rk29/devices.c @@ -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 } -- 2.34.1