[U-Boot] [PATCH v2 1/5] tpm: Add a delay on start-up

Simon Glass sjg at chromium.org
Sun Nov 18 21:22:24 UTC 2018


Some TPMs hang on startup without a short delay after getting the lock.
Add a small delay to cope with this.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2:
- Split out from main TPM patch

 drivers/tpm/tpm_tis_lpc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/tpm/tpm_tis_lpc.c b/drivers/tpm/tpm_tis_lpc.c
index e993fd9f833..79e952146c2 100644
--- a/drivers/tpm/tpm_tis_lpc.c
+++ b/drivers/tpm/tpm_tis_lpc.c
@@ -408,6 +408,9 @@ static int tpm_tis_lpc_open(struct udevice *dev)
 		return ret;
 	}
 
+	/* Certain TPMs need some delay here or they hang */
+	udelay(10);
+
 	tpm_write_word(priv, TIS_STS_COMMAND_READY,
 		       &regs[locality].tpm_status);
 	return 0;
-- 
2.19.1.1215.g8438c0b245-goog



More information about the U-Boot mailing list