diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2018-01-17 17:22:42 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-18 20:18:11 -0800 |
commit | ead2428e915ba97185d35dfcfcf86feda5ff0059 (patch) | |
tree | 8faded8de55974aff489ff7a79a3ffa8dbf2d022 /common/cbi.c | |
parent | 4941dd5542339f603b5d73ec61846a282e6556a8 (diff) | |
download | chrome-ec-ead2428e915ba97185d35dfcfcf86feda5ff0059.tar.gz |
CBI: Allow get command to reload data from EEPROM
This patch adds CBI_GET_RELOAD flag to EC_CMD_GET_CROS_BOARD_INFO
command. When the flag is set, the command will be forced to read
data from EEPROM even, ignoring the data cached by the previous
read.
This allows ectool to verify a write was successful without reboot.
BUG=b:70294260
BRANCH=none
TEST=ectool cbi set 0 0x1234 && ectool cbi get 0 1
Change-Id: I3e7ced5be56a74c605870a4c0622c0a2f47963bb
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/874155
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common/cbi.c')
-rw-r--r-- | common/cbi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/cbi.c b/common/cbi.c index bc21d901fa..c0cba85e4a 100644 --- a/common/cbi.c +++ b/common/cbi.c @@ -172,6 +172,9 @@ static int hc_cbi_get(struct host_cmd_handler_args *args) { const struct __ec_align4 ec_params_get_cbi *p = args->params; + if (p->flag & CBI_GET_RELOAD) + cached_read_result = EC_ERROR_CBI_CACHE_INVALID; + if (read_board_info()) return EC_RES_ERROR; |