[coreboot-gerrit] New patch to review for coreboot: 76c6cf6 tpm: i2c: When probing the TPM, write a 0 into the TPM access register.
Isaac Christensen (isaac.christensen@se-eng.com)
gerrit at coreboot.org
Thu Oct 2 20:33:05 CEST 2014
Isaac Christensen (isaac.christensen at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7007
-gerrit
commit 76c6cf6052a22283b71d5abffe120bb34acfc163
Author: Gabe Black <gabeblack at google.com>
Date: Wed Mar 26 21:51:41 2014 -0700
tpm: i2c: When probing the TPM, write a 0 into the TPM access register.
Not doing so makes it fail when run at high frequency.
Change-Id: I1cfb69c55f03cb90f66f437289803d897a1aad5c
Signed-off-by: Gabe Black <gabeblack at google.com>
Reviewed-on: https://chromium-review.googlesource.com/191812
Reviewed-by: Tom Warren <twarren at nvidia.com>
Reviewed-by: Jimmy Zhang <jimmzhang at nvidia.com>
Reviewed-by: David Hendricks <dhendrix at chromium.org>
Tested-by: Tom Warren <twarren at nvidia.com>
Commit-Queue: Gabe Black <gabeblack at chromium.org>
(cherry picked from commit 04452441d2bfe2cacd3e0b6990c0e9261b5350d1)
Signed-off-by: Isaac Christensen <isaac.christensen at se-eng.com>
---
src/drivers/i2c/tpm/tis.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/drivers/i2c/tpm/tis.c b/src/drivers/i2c/tpm/tis.c
index 3a5f519..e8d69ac 100644
--- a/src/drivers/i2c/tpm/tis.c
+++ b/src/drivers/i2c/tpm/tis.c
@@ -79,10 +79,10 @@ int tis_init(void)
* Probe TPM twice; the first probing might fail because TPM is asleep,
* and the probing can wake up TPM.
*/
- uint8_t tmp;
+ uint8_t tmp = 0;
- if (i2c_read(bus, chip, 0, 0, &tmp, sizeof(tmp)) &&
- i2c_read(bus, chip, 0, 0, &tmp, sizeof(tmp)))
+ if (i2c_write(bus, chip, 0, 1, &tmp, sizeof(tmp)) &&
+ i2c_write(bus, chip, 0, 1, &tmp, sizeof(tmp)))
return -1;
return 0;
More information about the coreboot-gerrit
mailing list