summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2021-12-14 20:42:59 -0600
committerCommit Bot <commit-bot@chromium.org>2021-12-15 20:18:42 +0000
commite2e3930de0034998f720386da41cc7c70b3e88b4 (patch)
tree20bcb2eaa7ca7badc9bab9f26e2e0c65094d5809
parent2878893ca33adac408233bcc53813fdaf7675f72 (diff)
downloadchrome-ec-e2e3930de0034998f720386da41cc7c70b3e88b4.tar.gz
H1_RED_BOARD: modify get_properties
Only default to SPI and PLT_RST when no valid properties are found. BUG=b:210760012 TEST=make clobber ; make -j BOARD=cr50 CRYPTO_TEST=1 H1_RED_BOARD=1 Change-Id: Ic2842bc305322deb5fdc43e1d3487d499e9cb23b Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3341778 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
-rw-r--r--board/cr50/board.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c
index 2679af3d86..3cf0156c26 100644
--- a/board/cr50/board.c
+++ b/board/cr50/board.c
@@ -1543,11 +1543,11 @@ static uint32_t get_properties(void)
uint8_t config;
uint32_t properties;
-#ifdef H1_RED_BOARD
- CPRINTS("Unconditionally enabling SPI and platform reset");
- return (BOARD_PERIPH_CONFIG_SPI | BOARD_USE_PLT_RESET);
-#endif
if (get_strap_config(&config) != EC_SUCCESS) {
+#ifdef H1_RED_BOARD
+ CPRINTS("Unconditionally enabling SPI and platform reset");
+ return (BOARD_PERIPH_CONFIG_SPI | BOARD_USE_PLT_RESET);
+#else
/*
* No pullups were detected on any of the strap pins so there
* is no point in checking for a matching config table entry.
@@ -1556,6 +1556,7 @@ static uint32_t get_properties(void)
CPRINTS("Invalid strap pins! Default properties = 0x%x",
BOARD_PROPERTIES_DEFAULT);
return BOARD_PROPERTIES_DEFAULT;
+#endif
}
/* Search board config table to find a matching entry */