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. BUG=chrome-os-partner:27220 TEST=Built and booted on nyan with EFS and with the TPM turned up to 400 KHz. BRANCH=None Change-Id: I1cfb69c55f03cb90f66f437289803d897a1aad5c Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://chromium-review.googlesource.com/191812 Reviewed-by: Tom Warren <twarren@nvidia.com> Reviewed-by: Jimmy Zhang <jimmzhang@nvidia.com> Reviewed-by: David Hendricks <dhendrix@chromium.org> Tested-by: Tom Warren <twarren@nvidia.com> Commit-Queue: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
parent
7b19a09565
commit
04452441d2
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue