Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/28552
Change subject: ec/google/chromeec: Add support to query the board version ......................................................................
ec/google/chromeec: Add support to query the board version
The board version is part of EC's EEPROM. Add a helper function to query the EC regarding the board version.
BUG=b:114001972,114677884,114677887
Change-Id: I57e8b78f1effe30bcbc81b275708be2d07f7cb75 Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com Tested-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/ec/google/chromeec/ec.c M src/ec/google/chromeec/ec.h 2 files changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/52/28552/1
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index 449eaf3..8caeeec 100644 --- a/src/ec/google/chromeec/ec.c +++ b/src/ec/google/chromeec/ec.c @@ -607,6 +607,11 @@ return cbi_get_uint32(id, CBI_TAG_OEM_ID); }
+int google_chromeec_cbi_get_board_version(uint32_t *ver) +{ + return cbi_get_uint32(ver, CBI_TAG_BOARD_VERSION); +} + int google_chromeec_cbi_get_dram_part_num(char *buf, size_t bufsize) { struct ec_params_get_cbi p = { diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h index 2c6f1d6..32a6af1 100644 --- a/src/ec/google/chromeec/ec.h +++ b/src/ec/google/chromeec/ec.h @@ -74,6 +74,7 @@ */ int google_chromeec_cbi_get_oem_id(uint32_t *id); int google_chromeec_cbi_get_sku_id(uint32_t *id); +int google_chromeec_cbi_get_board_version(uint32_t *ver); int google_chromeec_cbi_get_dram_part_num(char *buf, size_t bufsize);
/* MEC uses 0x800/0x804 as register/index pair, thus an 8-byte resource. */