diff options
author | Aaron Durbin <adurbin@chromium.org> | 2020-04-13 22:24:09 -0600 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2020-04-16 03:53:31 +0000 |
commit | 53525771f0584ea87da78047ceac5682d77a31bf (patch) | |
tree | 91d3460bd86277b2010d7fced038a0ab80f2bbd7 /src/ec | |
parent | e433bccb86aba62759cec88a34dcc0b5c38a3677 (diff) |
ec/google/chromeec: add BOARD_VERSION CBI support
Obtaining the CBI_TAG_BOARD_VERSION value wasn't in the code base.
Add the binding for it so it can be used.
BUG=b:153640981
Change-Id: Ie2f289631f908014432596448e56b5048a196a10
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40355
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/ec')
-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 |