summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2018-01-17 17:22:42 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-01-18 20:18:11 -0800
commitead2428e915ba97185d35dfcfcf86feda5ff0059 (patch)
tree8faded8de55974aff489ff7a79a3ffa8dbf2d022 /include/ec_commands.h
parent4941dd5542339f603b5d73ec61846a282e6556a8 (diff)
downloadchrome-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 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 705e54f2b1..e1573e85b9 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -4592,8 +4592,17 @@ enum cbi_data_type {
CBI_DATA_COUNT,
};
+/*
+ * Flags to control read operation
+ *
+ * RELOAD: Invalidate cache and read data from EEPROM. Useful to verify
+ * write was successful without reboot.
+ */
+#define CBI_GET_RELOAD (1 << 0)
+
struct __ec_align4 ec_params_get_cbi {
uint32_t type; /* enum cbi_data_type */
+ uint32_t flag; /* CBI_GET_* */
};
/*
@@ -4609,7 +4618,7 @@ struct __ec_align4 ec_params_get_cbi {
struct __ec_align1 ec_params_set_cbi {
uint32_t type; /* enum cbi_data_type */
- uint8_t flag; /* CBI_SET_* */
+ uint32_t flag; /* CBI_SET_* */
uint32_t data; /* For numeric value */
uint8_t raw[]; /* For string and raw data */
};