mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
tpm: core: Set timeouts before requesting locality
Requesting the locality uses the timeout values, so they need to be set beforehand. Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
6f00b97d7e
commit
8d7199da3f
1 changed files with 4 additions and 3 deletions
|
@ -433,15 +433,16 @@ int tpm_tis_init(struct udevice *dev)
|
|||
log_err("Driver bug. No bus ops defined\n");
|
||||
return -1;
|
||||
}
|
||||
ret = tpm_tis_request_locality(dev, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
chip->timeout_a = TIS_SHORT_TIMEOUT_MS;
|
||||
chip->timeout_b = TIS_LONG_TIMEOUT_MS;
|
||||
chip->timeout_c = TIS_SHORT_TIMEOUT_MS;
|
||||
chip->timeout_d = TIS_SHORT_TIMEOUT_MS;
|
||||
|
||||
ret = tpm_tis_request_locality(dev, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Disable interrupts */
|
||||
phy_ops->read32(dev, TPM_INT_ENABLE(chip->locality), &tmp);
|
||||
tmp |= TPM_INTF_CMD_READY_INT | TPM_INTF_LOCALITY_CHANGE_INT |
|
||||
|
|
Loading…
Reference in a new issue