diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2019-02-01 14:08:48 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-02-04 22:49:22 -0800 |
commit | f00865ed96cbba79e34fa210279eb178ec92e778 (patch) | |
tree | c4b66174097d9884c44f11a19f4d02addb600c84 /board/cr50 | |
parent | 03c345ddb00961f3f2adc8926c7a0d72167b849a (diff) | |
download | chrome-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')
-rw-r--r-- | board/cr50/board.c | 4 | ||||
-rw-r--r-- | board/cr50/build.mk | 4 |
2 files changed, 8 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 diff --git a/board/cr50/build.mk b/board/cr50/build.mk index b12bdc5f8b..87d1f93423 100644 --- a/board/cr50/build.mk +++ b/board/cr50/build.mk @@ -62,6 +62,10 @@ board-y += tpm_nvmem_ops.o board-y += wp.o board-$(CONFIG_U2F) += u2f.o +ifneq ($(H1_RED_BOARD),) +CPPFLAGS += -DH1_RED_BOARD +endif + # Build and link with an external library EXTLIB := $(realpath ../../third_party/tpm2) CFLAGS += -I$(EXTLIB) |