diff options
author | Sooraj Govindan <sooraj.govindan@intel.com> | 2019-10-10 21:38:51 +0530 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-10 21:04:38 +0000 |
commit | 5f429581855f887a81be11804838449ca77f9672 (patch) | |
tree | f5193c93839d9cb8ba3424fb5b4663c899857063 /util | |
parent | 64482f3c1cedeaa2c0cbf665f851cc85e5eeae5f (diff) | |
download | chrome-ec-5f429581855f887a81be11804838449ca77f9672.tar.gz |
EC: Implementation for AP reboot from G3 state using ectool command.
The new ectool command 'ectool reboot_ap_on_g3' will reboot AP from
G3 state on initiation of DUT shutdown. Thus eliminating the dependency
of servo to trigger wake events when testing AP cold boot cycles.
BUG=b:129507479
BRANCH=None
TEST=Tested on hatch board.
From Kernel console, entered the below commands:
$ectool reboot_ap_on_g3
$shutdown -h now
Observed AP boots back to S0 upon G3.
Change-Id: Ie6fcbd2f00eb6c22ed498ab82dac53132dbbf4a3
Signed-off-by: Poornima Tom <poornima.tom@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1918993
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/ectool.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/util/ectool.c b/util/ectool.c index 32ebe478e9..802ea530ba 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -255,6 +255,9 @@ const char help_str[] = " reboot_ec <RO|RW|cold|hibernate|hibernate-clear-ap-off|disable-jump>" " [at-shutdown|switch-slot]\n" " Reboot EC to RO or RW\n" + " reboot_ap_on_g3\n" + " Requests that the EC will automatically reboot the AP the next time\n" + " we enter the G3 power state.\n" " rollbackinfo\n" " Print rollback block information\n" " rtcget\n" @@ -1090,6 +1093,13 @@ int cmd_reboot_ec(int argc, char *argv[]) return (rv < 0 ? rv : 0); } +int cmd_reboot_ap_on_g3(int argc, char *argv[]) +{ + int rv; + + rv = ec_command(EC_CMD_REBOOT_AP_ON_G3, 0, NULL, 0, NULL, 0); + return (rv < 0 ? rv : 0); +} int cmd_flash_info(int argc, char *argv[]) { @@ -9262,6 +9272,7 @@ const struct command commands[] = { {"version", cmd_version}, {"waitevent", cmd_wait_event}, {"wireless", cmd_wireless}, + {"reboot_ap_on_g3", cmd_reboot_ap_on_g3}, {NULL, NULL} }; |