diff options
author | Colin Cross <ccross@android.com> | 2012-03-14 16:29:47 -0700 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2013-07-01 13:40:39 -0700 |
commit | 7d2e593be19fe0a3c8c6fa5ab14bee55457bef4d (patch) | |
tree | 28a58f5252136d702f65c2b05ac335eac6cb7992 /arch/arm | |
parent | 9a54ba13c608ee365c9f97f4dfb41910e68614f4 (diff) |
ARM: fiq_debugger: add support for reboot commands
Pass the rest of the reboot command to kernel_restart to allow
reboot bootloader to work from FIQ debugger.
Change-Id: I4e7b366a69268dda17ffcf4c84f2373d15cb1271
Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/common/fiq_debugger.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/common/fiq_debugger.c b/arch/arm/common/fiq_debugger.c index 0e33748edd6..3f75495fab0 100644 --- a/arch/arm/common/fiq_debugger.c +++ b/arch/arm/common/fiq_debugger.c @@ -592,8 +592,17 @@ static bool debug_fiq_exec(struct fiq_debugger_state *state, dump_allregs(state, regs); } else if (!strcmp(cmd, "bt")) { dump_stacktrace(state, (struct pt_regs *)regs, 100, svc_sp); - } else if (!strcmp(cmd, "reboot")) { - kernel_restart(NULL); + } else if (!strncmp(cmd, "reboot", 6)) { + cmd += 6; + while (*cmd == ' ') + cmd++; + if (*cmd) { + char tmp_cmd[32]; + strlcpy(tmp_cmd, cmd, sizeof(tmp_cmd)); + kernel_restart(tmp_cmd); + } else { + kernel_restart(NULL); + } } else if (!strcmp(cmd, "irqs")) { dump_irqs(state); } else if (!strcmp(cmd, "kmsg")) { |