summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2016-09-26 15:47:16 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-09-27 00:27:37 -0700
commitd6d12ec67bb0d20229ee0c273bc9d917b0821eb4 (patch)
tree8583a23dd0806c9ec0e20d1d1b80bd3be482cb2e /board
parent98541217dfd5f0a3fa29db27c4469c6de26842f3 (diff)
downloadchrome-ec-d6d12ec67bb0d20229ee0c273bc9d917b0821eb4.tar.gz
cr50: tpm: ignore sys_rst_l/plt_rst_l when TPM reset is in progress
There is no point in invoking TPM reset while the current invocation is in progress. One of the cases when this is happening is early start up on Kevin/Gru: the device starts booting, the EC comes around to pulsing sys_rst_l when TPM is already busy installing endorsement certificates. There is no point in issuing another reset at that point, just let the process continue. BRANCH=none BUG=chrome-os-partner:52366 TEST=firmware_TPMKernelVersion firmware_TPMExtend autotests still pass on kevin. Certificate installation during startup does not get interrupted any more. Change-Id: Ibdface9f7a76186e210ef0f4111cd5fe9905bba9 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/389811 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/cr50/board.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c
index e370973778..b232633a87 100644
--- a/board/cr50/board.c
+++ b/board/cr50/board.c
@@ -390,9 +390,13 @@ void sys_rst_asserted(enum gpio_signal signal)
* Cr50 drives SYS_RST_L in certain scenarios, in those cases
* this signal's assertion should be ignored here.
*/
- CPRINTS("%s", __func__);
- if (usb_spi_update_in_progress() || is_sys_rst_asserted())
+ CPRINTS("%s from %d", __func__, signal);
+ if (usb_spi_update_in_progress() ||
+ is_sys_rst_asserted() ||
+ tpm_is_resetting()) {
+ CPRINTS("%s ignored", __func__);
return;
+ }
/* Re-initialize the TPM software state */
tpm_reset();