diff options
author | Pawit Pornkitprasan <p.pawit@gmail.com> | 2012-01-18 21:31:52 +0700 |
---|---|---|
committer | Pawit Pornkitprasan <p.pawit@gmail.com> | 2012-01-18 21:31:52 +0700 |
commit | 43a10baf0aeec07bfc1913b76a29b2a20d0f9c7a (patch) | |
tree | ee7c6d9b5576171e902007c4613def32fff88bd1 /arch/arm/mach-s5pv210 | |
parent | 427e7a6f446ff8cceb18a6829fcbdf45589d3b13 (diff) | |
download | kernel_samsung_aries-43a10baf0aeec07bfc1913b76a29b2a20d0f9c7a.zip kernel_samsung_aries-43a10baf0aeec07bfc1913b76a29b2a20d0f9c7a.tar.gz kernel_samsung_aries-43a10baf0aeec07bfc1913b76a29b2a20d0f9c7a.tar.bz2 |
aries: Only inject bootmode if bootmode is single digit
This prevents confusion with watchdog reboot (bootmode=238) which
will confuse the script grepping for bootmode=2 causing unintended
reboot into recovery
Diffstat (limited to 'arch/arm/mach-s5pv210')
-rw-r--r-- | arch/arm/mach-s5pv210/mach-aries.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-s5pv210/mach-aries.c b/arch/arm/mach-s5pv210/mach-aries.c index 0b0a0e7..c1ee756 100644 --- a/arch/arm/mach-s5pv210/mach-aries.c +++ b/arch/arm/mach-s5pv210/mach-aries.c @@ -5177,6 +5177,7 @@ static void aries_pm_restart(char mode, const char *cmd) // Ugly hack to inject parameters (e.g. device serial, bootmode) into /proc/cmdline static void __init aries_inject_cmdline(void) { char *new_command_line; + int bootmode = __raw_readl(S5P_INFORM6); int size; size = strlen(boot_command_line); @@ -5184,7 +5185,13 @@ static void __init aries_inject_cmdline(void) { strcpy(new_command_line, saved_command_line); size += sprintf(new_command_line + size, " androidboot.serialno=%08X%08X", system_serial_high, system_serial_low); - size += sprintf(new_command_line + size, " bootmode=%d", __raw_readl(S5P_INFORM6)); + + // Only write bootmode when less than 10 to prevent confusion with watchdog + // reboot (0xee = 238) + if (bootmode < 10) { + size += sprintf(new_command_line + size, " bootmode=%d", bootmode); + } + saved_command_line = new_command_line; } |