[coreboot-gerrit] Change in coreboot[master]: drivers/i2c/tpm/cr50: Increase init delay to 30 seconds

Furquan Shaikh (Code Review) gerrit at coreboot.org
Wed Nov 8 20:36:14 CET 2017


Hello Duncan Laurie,

I'd like you to do a code review. Please visit

    https://review.coreboot.org/22379

to review the following change.


Change subject: drivers/i2c/tpm/cr50: Increase init delay to 30 seconds
......................................................................

drivers/i2c/tpm/cr50: Increase init delay to 30 seconds

In case the TPM is doing a long crypto operation the initial probe
could be very delayed.  Rather than end up in recovery make the delay
long enough to accommodate the (current) long crypto times.

BUG=b:65867313, b:68729265
TEST=Verified that Soraka no longer hangs during EC reboot test.

Change-Id: I3bccff70e001dfc065c24be8ad34ef239a144db1
Signed-off-by: Duncan Laurie <dlaurie at google.com>
Signed-off-by: Furquan Shaikh <furquan at chromium.org>
---
M src/drivers/i2c/tpm/cr50.c
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/22379/1

diff --git a/src/drivers/i2c/tpm/cr50.c b/src/drivers/i2c/tpm/cr50.c
index baf5fe0..9cc9e95 100644
--- a/src/drivers/i2c/tpm/cr50.c
+++ b/src/drivers/i2c/tpm/cr50.c
@@ -43,6 +43,7 @@
 #include "tpm.h"
 
 #define CR50_MAX_BUFSIZE	63
+#define CR50_TIMEOUT_INIT_MS	30000	/* Very long timeout for TPM init */
 #define CR50_TIMEOUT_LONG_MS	2000	/* Long timeout while waiting for TPM */
 #define CR50_TIMEOUT_SHORT_MS	2	/* Short timeout during transactions */
 #define CR50_TIMEOUT_NOIRQ_MS	20	/* Timeout for TPM ready without IRQ */
@@ -423,7 +424,7 @@
 	struct stopwatch sw;
 	uint8_t buf = 0;
 	int ret;
-	long sw_run_duration = CR50_TIMEOUT_LONG_MS;
+	long sw_run_duration = CR50_TIMEOUT_INIT_MS;
 
 	tpm_dev->bus = bus;
 	tpm_dev->addr = addr;

-- 
To view, visit https://review.coreboot.org/22379
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bccff70e001dfc065c24be8ad34ef239a144db1
Gerrit-Change-Number: 22379
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Duncan Laurie <dlaurie at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171108/0e067954/attachment.html>


More information about the coreboot-gerrit mailing list