diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2018-02-15 12:38:15 -0800 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2018-02-17 04:01:03 +0000 |
commit | f984a05cc79e3f87f474b5470a28e51a105ba309 (patch) | |
tree | ce26a73b7f5aa39289c855319028b05f2eb43fb4 /src | |
parent | c205ae0c6e414a8fe34f25f2f9e23b97182b17e6 (diff) |
chromeec: Sync ec_commands.h for CBI tags
This patch syncs ec_commands.h with the one in chromeec.
BUG=b:70294260
BRANCH=none
TEST=Verify SKU_ID and OEM_ID are correctly recognized on Fizz.
Change-Id: I451ec9f6f9d7257915b7d4cb1e5adbee82d107de
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://review.coreboot.org/23788
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/google/chromeec/ec.c | 4 | ||||
-rw-r--r-- | src/ec/google/chromeec/ec_commands.h | 21 |
2 files changed, 11 insertions, 14 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index 764c6ac74f..c902c3fa7e 100644 --- a/src/ec/google/chromeec/ec.c +++ b/src/ec/google/chromeec/ec.c @@ -585,12 +585,12 @@ static int cbi_get_uint32(uint32_t *id, uint32_t type) int google_chromeec_cbi_get_sku_id(uint32_t *id) { - return cbi_get_uint32(id, CBI_DATA_SKU_ID); + return cbi_get_uint32(id, CBI_TAG_SKU_ID); } int google_chromeec_cbi_get_oem_id(uint32_t *id) { - return cbi_get_uint32(id, CBI_DATA_OEM_ID); + return cbi_get_uint32(id, CBI_TAG_OEM_ID); } #ifndef __SMM__ diff --git a/src/ec/google/chromeec/ec_commands.h b/src/ec/google/chromeec/ec_commands.h index 7c515c21b0..4f46fab6a8 100644 --- a/src/ec/google/chromeec/ec_commands.h +++ b/src/ec/google/chromeec/ec_commands.h @@ -4382,14 +4382,11 @@ struct __ec_align1 ec_params_efs_verify { */ #define EC_CMD_SET_CROS_BOARD_INFO 0x0120 -enum cbi_data_type { - /* integer types */ - CBI_DATA_BOARD_VERSION = 0, - CBI_DATA_OEM_ID = 1, - CBI_DATA_SKU_ID = 2, - /* string types */ - CBI_FIRST_STRING_PARAM = 0x1000, - CBI_DATA_COUNT, +enum cbi_data_tag { + CBI_TAG_BOARD_VERSION = 0, /* uint16_t or uint8_t[] = {minor,major} */ + CBI_TAG_OEM_ID = 1, /* uint8_t */ + CBI_TAG_SKU_ID = 2, /* uint8_t */ + CBI_TAG_COUNT, }; /* @@ -4401,7 +4398,7 @@ enum cbi_data_type { #define CBI_GET_RELOAD (1 << 0) struct __ec_align4 ec_params_get_cbi { - uint32_t type; /* enum cbi_data_type */ + uint32_t type; /* enum cbi_data_tag */ uint32_t flag; /* CBI_GET_* */ }; @@ -4417,10 +4414,10 @@ struct __ec_align4 ec_params_get_cbi { #define CBI_SET_INIT (1 << 1) struct __ec_align1 ec_params_set_cbi { - uint32_t type; /* enum cbi_data_type */ + uint32_t tag; /* enum cbi_data_tag */ uint32_t flag; /* CBI_SET_* */ - uint32_t data; /* For numeric value */ - uint8_t raw[]; /* For string and raw data */ + uint32_t size; /* Data size */ + uint8_t data[]; /* For string and raw data */ }; /*****************************************************************************/ |