summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKangheui Won <khwon@chromium.org>2021-04-09 15:37:15 +1000
committerMartin Roth <martinroth@google.com>2021-04-12 17:11:40 +0000
commit082be1073e5dbb5a2ec8c5f4cae82b2d54ff9780 (patch)
tree5a8153f68dbcbbac1a85da6853d0a68d6a4497e7
parentc5f1dc96bf0b18245d7986463ae56958c44d24f2 (diff)
downloadcoreboot-082be1073e5dbb5a2ec8c5f4cae82b2d54ff9780.tar.gz
coreboot-082be1073e5dbb5a2ec8c5f4cae82b2d54ff9780.tar.bz2
coreboot-082be1073e5dbb5a2ec8c5f4cae82b2d54ff9780.zip
chromeec: make ssfc optional in fw_config
When EC_GOOGLE_CHROMEEC_INCLUDE_SSFC_IN_FW_CONFIG is enabled and SSFC is not set, all fw_config is invalidated. But for some platform this may not be necessary, we can treat missing SSFC as zero and use other 32 bits of firmware config. BUG=b:184809649 TEST=boot and check fw_config is not -1 even if ssfc is not set BRANCH=zork Signed-off-by: Kangheui Won <khwon@chromium.org> Change-Id: I21c7b0d449a694d28ad7b3f14b035e3a5830030a Reviewed-on: https://review.coreboot.org/c/coreboot/+/52205 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Marco Chen <marcochen@google.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
-rw-r--r--src/ec/google/chromeec/ec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index affe66ef8f67..29d04119b87e 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -856,10 +856,8 @@ int google_chromeec_cbi_get_fw_config(uint64_t *fw_config)
if (CONFIG(EC_GOOGLE_CHROMEEC_INCLUDE_SSFC_IN_FW_CONFIG)) {
uint32_t ssfc;
- if (google_chromeec_cbi_get_ssfc(&ssfc))
- return -1;
-
- *fw_config |= (uint64_t)ssfc << 32;
+ if (!google_chromeec_cbi_get_ssfc(&ssfc))
+ *fw_config |= (uint64_t)ssfc << 32;
}
return 0;
}