summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/tpm/tpm.h
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2016-09-07 10:52:12 -0700
committerDuncan Laurie <dlaurie@chromium.org>2016-09-08 16:24:08 +0200
commit1ca196841ac4db46d8d9c3c55004c3e9ee3c8844 (patch)
tree75c49bdb3430a4fb60a82201399b7d7ed53b54d0 /src/drivers/i2c/tpm/tpm.h
parent7fbdad80fd439a8afb04e20bd67c8c5fe766dc1a (diff)
drivers/i2c/tpm: Fix early TPM probe
The early TPM probe was done directly in tis.c ignoring the lower layer that provides appropriate access to the chip. Move this into a tpm_vendor_probe() function so it can use iic_tpm_read() with all of the built-in delays and semantics instead of calling i2c_readb() directly from the wrong layer. This fixes early init failures that were seen with the cr50 i2c tpm on the reef mainboard. Change-Id: I9bb3b820d10f6e2ea24c57b90cf0edc813cdc7e0 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://review.coreboot.org/16527 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/drivers/i2c/tpm/tpm.h')
-rw-r--r--src/drivers/i2c/tpm/tpm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/i2c/tpm/tpm.h b/src/drivers/i2c/tpm/tpm.h
index 7dfd59481d..ddf12a9e98 100644
--- a/src/drivers/i2c/tpm/tpm.h
+++ b/src/drivers/i2c/tpm/tpm.h
@@ -121,6 +121,8 @@ struct tpm_cmd_t {
/* ---------- Interface for TPM vendor ------------ */
+int tpm_vendor_probe(unsigned bus, uint32_t addr);
+
int tpm_vendor_init(struct tpm_chip *chip, unsigned bus, uint32_t dev_addr);
void tpm_vendor_cleanup(struct tpm_chip *chip);