diff options
author | David Hendricks <dhendrix@chromium.org> | 2012-05-31 22:08:28 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-06-01 14:45:57 -0700 |
commit | 422b08128512d272d3fca41564ee2dbf4c2b7b34 (patch) | |
tree | 7c14aaaa1af929cf6ad72d6bf730f454516b22ae | |
parent | c25c92ff5e1dde14657ade5eea13703f94e772de (diff) | |
download | chrome-ec-422b08128512d272d3fca41564ee2dbf4c2b7b34.tar.gz |
Send success code when rebooting EC using I2C host commands
This causes the reboot command to respond to the host via I2C with
EC_RES_SUCCESS.
Signed-off-by: David Hendricks <dhendrix@chromium.org>
BUG=none
TEST=tested on Snow and Link using ectool and flashrom
Both machines were able to reboot the EC and go thru an EC update via
Flashrom successfully:
localhost ~ # ectool reboot_ec RO ; echo $?
done.
0
Flashrom is also able to do a fully automatic update, without the
user specifying a layout:
Reading old contents from flash chip... done.
Found 'RO_SECTION' in image.
Found 'RW_SECTION_A' in image.
GEC is jumping to [RO_SECTION]
GEC has jumped to [RO_SECTION]
Erasing and writing flash chip...
...
GEC is jumping to [RW_SECTION_A]
GEC has jumped to [RW_SECTION_A]
GEC needs 2nd pass.
...
Change-Id: Id723c26caa8f352a7ddc6ebfae664448c38300f0
Reviewed-on: https://gerrit.chromium.org/gerrit/24290
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
-rw-r--r-- | common/system_common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/system_common.c b/common/system_common.c index c654143695..d5da126943 100644 --- a/common/system_common.c +++ b/common/system_common.c @@ -731,10 +731,14 @@ int host_command_reboot(uint8_t *data, int *resp_size) return EC_RES_ERROR; } +#ifdef CONFIG_TASK_HOSTCMD #ifdef CONFIG_LPC /* Clean busy bits on host */ host_send_result(0, EC_RES_SUCCESS); host_send_result(1, EC_RES_SUCCESS); +#elif defined CONFIG_I2C + host_send_result(0, EC_RES_SUCCESS); +#endif #endif CPUTS("[Executing host reboot command]\n"); |