diff options
author | Duncan Laurie <dlaurie@google.com> | 2017-11-07 09:13:19 -0800 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2017-11-09 19:05:32 +0000 |
commit | 469af7b1d7f2d4f4242e056b714e416e5fe921ea (patch) | |
tree | eecfc569c0763d5c4d48be875813424328e115aa | |
parent | 605c2dc2511b0cf207a3c1e6b2e99be4a0bd34bb (diff) |
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@google.com>
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/22379
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r-- | src/drivers/i2c/tpm/cr50.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/i2c/tpm/cr50.c b/src/drivers/i2c/tpm/cr50.c index baf5fe0cce..9cc9e95ffb 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 @@ int tpm_vendor_probe(unsigned int bus, uint32_t addr) 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; |