TPM: Stop requesting/releasing the TPM locality.
The locality is requested when the TPM is initialized and released when it's cleaned up. There's no reason to set it to the same thing again and restore it back to the same value before and after every transaction. BUG=None TEST=Built and booted on pit. BRANCH=None forward ported from https://chromium-review.googlesource.com/#/c/168400 Change-Id: I291d1f86f220ef0eff6809c6cb00459bf95aa5e0 Signed-off-by: Gabe Black <gabeblack@google.com> Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: https://chromium-review.googlesource.com/168584 Reviewed-by: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
parent
b22395a73f
commit
cc866c20c6
1 changed files with 0 additions and 5 deletions
|
|
@ -429,7 +429,6 @@ static int tpm_tis_i2c_recv(struct tpm_chip *chip, uint8_t *buf, size_t count)
|
|||
|
||||
out:
|
||||
tpm_tis_i2c_ready(chip);
|
||||
release_locality(chip, chip->vendor.locality, 0);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
|
@ -444,9 +443,6 @@ static int tpm_tis_i2c_send(struct tpm_chip *chip, uint8_t *buf, size_t len)
|
|||
if (len > TPM_BUFSIZE)
|
||||
return -1; //E2BIG; /* command is too long for our tpm, sorry */
|
||||
|
||||
if (request_locality(chip, 0) < 0)
|
||||
return -1; //EBUSY;
|
||||
|
||||
status = tpm_tis_i2c_status(chip);
|
||||
if ((status & TPM_STS_COMMAND_READY) == 0) {
|
||||
tpm_tis_i2c_ready(chip);
|
||||
|
|
@ -499,7 +495,6 @@ static int tpm_tis_i2c_send(struct tpm_chip *chip, uint8_t *buf, size_t len)
|
|||
return len;
|
||||
out_err:
|
||||
tpm_tis_i2c_ready(chip);
|
||||
release_locality(chip, chip->vendor.locality, 0);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue