summaryrefslogtreecommitdiff
path: root/board/cr50/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/cr50/board.c')
-rw-r--r--board/cr50/board.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c
index ab3f959a62..229f4ab1f0 100644
--- a/board/cr50/board.c
+++ b/board/cr50/board.c
@@ -403,11 +403,17 @@ void sys_rst_asserted(enum gpio_signal signal)
return;
}
- if (reboot_request_posted)
+ if (reboot_request_posted) {
+ /*
+ * Reset TPM and wait to completion to make sure nvmem is
+ * committed before reboot.
+ */
+ tpm_reset(1, 0);
system_reset(SYSTEM_RESET_HARD); /* This will never return. */
-
- /* Re-initialize the TPM software state */
- tpm_reset(0, 0);
+ } else {
+ /* Reset TPM, no need to wait for completion. */
+ tpm_reset(0, 0);
+ }
}
void assert_sys_rst(void)