summaryrefslogtreecommitdiff
path: root/util/burn_my_ec.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-06-19 16:22:26 -0700
committerGerrit <chrome-bot@google.com>2012-06-20 23:30:02 -0700
commit80fa2da908d4f03b6f1bdf4da5876aff20af88cb (patch)
tree37404f6d52e6070d28b1101b20b2d4e294fc5ae5 /util/burn_my_ec.c
parent50ea753bbbd537fd38062899651027c185937be4 (diff)
downloadchrome-ec-80fa2da908d4f03b6f1bdf4da5876aff20af88cb.tar.gz
Add reboot-at-shutdown flag
Also removes unused recovery request, since AP handles that internally now. BUG=chrome-os-partner:10685 TEST=manual. From root shell, ectool reboot_ec RO -> EC reboots to RO, AP stays up ectool reboot_ec A -> EC reboots to A, AP stays up ectool reboot_ec cold -> EC reboots, AP shuts down ectool reboot_ec cold at-shutdown -> (EC stores request, but doesn't reboot) shutdown -P now -> EC reboots when AP shuts down ectool reboot_ec cold at-shutdown -> (EC stores request, but doesn't reboot) ectool reboot_ec cancel -> (EC stores cancel-request) shutdown -P now -> AP shuts down, but EC doesn't reboot Signed-off-by: Randall Spangler <rspangler@chromium.org> Change-Id: I51bbf997f6b7f94fe61f06a8a1804c3cc5c319b8 Reviewed-on: https://gerrit.chromium.org/gerrit/25791 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'util/burn_my_ec.c')
-rw-r--r--util/burn_my_ec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/burn_my_ec.c b/util/burn_my_ec.c
index cb8ead87ac..522f461e62 100644
--- a/util/burn_my_ec.c
+++ b/util/burn_my_ec.c
@@ -66,8 +66,8 @@ int flash_partition(enum ec_current_image part, const uint8_t *payload,
current = get_version();
if (current == part) {
- rst_req.target = part == EC_IMAGE_RO ?
- EC_IMAGE_RW_A : EC_IMAGE_RO;
+ rst_req.cmd = part == EC_IMAGE_RO ?
+ EC_REBOOT_JUMP_RW_A : EC_REBOOT_JUMP_RO;
ec_command(EC_CMD_REBOOT_EC, &rst_req, sizeof(rst_req),
NULL, 0);
/* wait EC reboot */