summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2012-03-14 16:29:47 -0700
committerJohn Stultz <john.stultz@linaro.org>2016-02-16 13:52:20 -0800
commit61b0d5a3c159d2ad9d9acdb48c68fcab5d0046f0 (patch)
tree619e7e2a60ee04215d175f88239bc22508bb9900 /arch
parentdcccb8f21c9df1016797f98a5fb595a23db0b3f5 (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')
-rw-r--r--arch/arm/common/fiq_debugger.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/common/fiq_debugger.c b/arch/arm/common/fiq_debugger.c
index 0e33748edd60..3f75495fab02 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")) {