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>
This commit is contained in:
Aaron Durbin 2020-04-13 22:24:09 -06:00
parent e433bccb86
commit 53525771f0
2 changed files with 8 additions and 0 deletions

View File

@ -848,6 +848,11 @@ int google_chromeec_cbi_get_oem_id(uint32_t *id)
return cbi_get_uint32(id, CBI_TAG_OEM_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) static int cbi_get_string(char *buf, size_t bufsize, uint32_t tag)
{ {
struct ec_params_get_cbi params = { struct ec_params_get_cbi params = {

View File

@ -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_fw_config(uint32_t *fw_config);
int google_chromeec_cbi_get_dram_part_num(char *buf, size_t bufsize); 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); 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_UNKNOWN 0xFFFFFFFF
#define CROS_SKU_UNPROVISIONED 0x7FFFFFFF #define CROS_SKU_UNPROVISIONED 0x7FFFFFFF