From 082be1073e5dbb5a2ec8c5f4cae82b2d54ff9780 Mon Sep 17 00:00:00 2001 From: Kangheui Won Date: Fri, 9 Apr 2021 15:37:15 +1000 Subject: 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 Change-Id: I21c7b0d449a694d28ad7b3f14b035e3a5830030a Reviewed-on: https://review.coreboot.org/c/coreboot/+/52205 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Marco Chen Reviewed-by: Karthik Ramasubramanian --- src/ec/google/chromeec/ec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3