diff options
author | Kangheui Won <khwon@chromium.org> | 2021-04-09 15:37:15 +1000 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2021-04-12 17:11:40 +0000 |
commit | 082be1073e5dbb5a2ec8c5f4cae82b2d54ff9780 (patch) | |
tree | 5a8153f68dbcbbac1a85da6853d0a68d6a4497e7 /src | |
parent | c5f1dc96bf0b18245d7986463ae56958c44d24f2 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/google/chromeec/ec.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index affe66ef8f..29d04119b8 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; } |