summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2016-08-26 13:04:32 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-08-30 02:50:32 -0700
commit2324ed47aa3b6da72a9c022a21b46a8ea9eb896c (patch)
tree6e7cc4140f4a6dfc6caf9deec7c4dc2e25da086d /util
parentcdbbb0d84088ff14177d95a8da1828d239315390 (diff)
downloadchrome-ec-2324ed47aa3b6da72a9c022a21b46a8ea9eb896c.tar.gz
ectool: Add ectool command to do AP force shutdown
Added support to do force AP shutdown from kernel console using the ectools. BUG=chrome-os-partner:56681 BRANCH=none TEST=make buildall -j; Manually tested on reef. "ectool reboot_ec apshutdown" puts system in G3. Change-Id: I509678a67a6a54da67de99efb00e1f08a1ed1fea Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/376863 Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'util')
-rw-r--r--util/ectool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/ectool.c b/util/ectool.c
index a32b67e3aa..fc6f2c7945 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -189,7 +189,7 @@ const char help_str[] =
" Set 16 bit duty cycle of given PWM\n"
" readtest <patternoffset> <size>\n"
" Reads a pattern from the EC via LPC\n"
- " reboot_ec <RO|RW|cold|hibernate|disable-jump> [at-shutdown]\n"
+ " reboot_ec <RO|RW|cold|hibernate|disable-jump|apshutdown> [at-shutdown]\n"
" Reboot EC to RO or RW\n"
" rtcget\n"
" Print real-time clock\n"
@@ -696,6 +696,8 @@ int cmd_reboot_ec(int argc, char *argv[])
p.cmd = EC_REBOOT_DISABLE_JUMP;
else if (!strcmp(argv[1], "hibernate"))
p.cmd = EC_REBOOT_HIBERNATE;
+ else if (!strcmp(argv[1], "apshutdown"))
+ p.cmd = EC_REBOOT_AP_SHUTDOWN;
else {
fprintf(stderr, "Unknown command: %s\n", argv[1]);
return -1;