summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2020-01-14 11:41:47 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-01-22 15:43:42 +0000
commit8db8a6154fd5ae78a8e183f5ddc5ae9e6141dfe7 (patch)
treec24f952515b44b149e1e813658a2ee73788baa02 /src
parentba2edaffdc74426b55c502b3c2705959421f532a (diff)
downloadcoreboot-8db8a6154fd5ae78a8e183f5ddc5ae9e6141dfe7.tar.gz
coreboot-8db8a6154fd5ae78a8e183f5ddc5ae9e6141dfe7.tar.bz2
coreboot-8db8a6154fd5ae78a8e183f5ddc5ae9e6141dfe7.zip
ec/google/chromeec: add support for fw_config cbi field
The firmware configuration (fw_config) field is store in the CBI EEPROM and it should be used to make firmware customization instead of sku/variant id. BUG=b:145519081 TEST=builds Change-Id: I790998a29e724ecdff8876cca072267537b7cea6 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38410 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/ec/google/chromeec/ec.c5
-rw-r--r--src/ec/google/chromeec/ec.h5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index b6020a3a621d..0b2303410156 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -885,6 +885,11 @@ int google_chromeec_cbi_get_sku_id(uint32_t *id)
return cbi_get_uint32(id, CBI_TAG_SKU_ID);
}
+int google_chromeec_cbi_get_fw_config(uint32_t *fw_config)
+{
+ return cbi_get_uint32(fw_config, CBI_TAG_FW_CONFIG);
+}
+
int google_chromeec_cbi_get_oem_id(uint32_t *id)
{
return cbi_get_uint32(id, CBI_TAG_OEM_ID);
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h
index 5ef43661170c..d90d24c767df 100644
--- a/src/ec/google/chromeec/ec.h
+++ b/src/ec/google/chromeec/ec.h
@@ -77,13 +77,14 @@ int google_chromeec_vstore_write(int slot, uint8_t *data, size_t size);
int google_chromeec_reboot(int dev_idx, enum ec_reboot_cmd type, uint8_t flags);
/**
- * Get OEM (or SKU) ID from Cros Board Info
+ * Get data from Cros Board Info
*
- * @param id [OUT] oem/sku id
+ * @param id/fw_config/buf [OUT] value from from CBI.
* @return 0 on success or negative integer for errors.
*/
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_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);