summaryrefslogtreecommitdiff
path: root/src/ec/google
diff options
context:
space:
mode:
authorMarco Chen <marcochen@google.com>2020-12-11 14:29:23 +0800
committerPatrick Georgi <pgeorgi@google.com>2021-01-08 08:25:42 +0000
commit525cc4626adc722008203030165ae0b81fbc2425 (patch)
treef1631e5204a3e992bde2062a3f5aa0d29af21150 /src/ec/google
parentd3b7e2f94af63a42e25738a67c92eb949f520d3d (diff)
ec/google/chromeec: add SSFC CBI support
An API is added to get SSFC value from cros EC. BUG=b:174118027 BRANCH=octopus TEST=check SSFC value from EC is correct compared to value in CBI Change-Id: Ifd521514bbc2e90c789f3760b72e8326e614e2b1 Signed-off-by: Marco Chen <marcochen@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/48791 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jett Rink <jettrink@google.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Diffstat (limited to 'src/ec/google')
-rw-r--r--src/ec/google/chromeec/ec.c5
-rw-r--r--src/ec/google/chromeec/ec.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index 26c6054a38..0915833b91 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -863,6 +863,11 @@ int google_chromeec_cbi_get_board_version(uint32_t *version)
return cbi_get_uint32(version, CBI_TAG_BOARD_VERSION);
}
+int google_chromeec_cbi_get_ssfc(uint32_t *ssfc)
+{
+ return cbi_get_uint32(ssfc, CBI_TAG_SSFC);
+}
+
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 c3c456ff14..7c41f0496f 100644
--- a/src/ec/google/chromeec/ec.h
+++ b/src/ec/google/chromeec/ec.h
@@ -89,6 +89,7 @@ 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);
+int google_chromeec_cbi_get_ssfc(uint32_t *ssfc);
#define CROS_SKU_UNKNOWN 0xFFFFFFFF
#define CROS_SKU_UNPROVISIONED 0x7FFFFFFF