summaryrefslogtreecommitdiff
path: root/board/cr50/board.c
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2019-02-01 14:08:48 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-02-04 22:49:22 -0800
commitf00865ed96cbba79e34fa210279eb178ec92e778 (patch)
treec4b66174097d9884c44f11a19f4d02addb600c84 /board/cr50/board.c
parent03c345ddb00961f3f2adc8926c7a0d72167b849a (diff)
downloadchrome-ec-f00865ed96cbba79e34fa210279eb178ec92e778.tar.gz
cr50: introduce "red board mode" build option
When running on the test board (aka Red Board) the resistor strappings need to be ignored, and SPI mode and PLT_RESET properties should be enabled unconditionally. The new make variable allows to compile the code as required. BRANCH=cr50, cr50-mp BUG=none TEST=verified that 'make H1_RED_BOARD=1 ...' produces an image which allows connecting to the FTDI SPI interface when running on the red board. Change-Id: I4763fd8678d44ecf7565049c50f82425aca46f1f Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1452937 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'board/cr50/board.c')
-rw-r--r--board/cr50/board.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c
index 20c5de0030..36af6c0ffe 100644
--- a/board/cr50/board.c
+++ b/board/cr50/board.c
@@ -1329,6 +1329,10 @@ static uint32_t get_properties(void)
return BOARD_SLAVE_CONFIG_SPI;
}
+#ifdef H1_RED_BOARD
+ CPRINTS("Unconditionally enabling SPI and platform reset");
+ return (BOARD_SLAVE_CONFIG_SPI | BOARD_USE_PLT_RESET);
+#endif
if (get_strap_config(&config) != EC_SUCCESS) {
/*
* No pullups were detected on any of the strap pins so there