diff options
Diffstat (limited to 'src/ec/google')
-rw-r--r-- | src/ec/google/chromeec/ec.c | 5 | ||||
-rw-r--r-- | src/ec/google/chromeec/ec.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index 8d9c2acb43..17e110c5c9 100644 --- a/src/ec/google/chromeec/ec.c +++ b/src/ec/google/chromeec/ec.c @@ -848,6 +848,11 @@ int google_chromeec_cbi_get_oem_id(uint32_t *id) return cbi_get_uint32(id, CBI_TAG_OEM_ID); } +int google_chromeec_cbi_get_board_version(uint32_t *version) +{ + return cbi_get_uint32(version, CBI_TAG_BOARD_VERSION); +} + static int cbi_get_string(char *buf, size_t bufsize, uint32_t tag) { struct ec_params_get_cbi params = { diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h index 77ba21169e..13e3bd9b7f 100644 --- a/src/ec/google/chromeec/ec.h +++ b/src/ec/google/chromeec/ec.h @@ -78,6 +78,9 @@ int google_chromeec_cbi_get_sku_id(uint32_t *id); int google_chromeec_cbi_get_fw_config(uint32_t *fw_config); int google_chromeec_cbi_get_dram_part_num(char *buf, size_t bufsize); int google_chromeec_cbi_get_oem_name(char *buf, size_t bufsize); +/* version may be stored in CBI as a smaller integer width, but the EC code + handles it correctly. */ +int google_chromeec_cbi_get_board_version(uint32_t *version); #define CROS_SKU_UNKNOWN 0xFFFFFFFF #define CROS_SKU_UNPROVISIONED 0x7FFFFFFF |