[PATCH 1/2] tpm: core: Set timeouts before requesting locality
Ilias Apalodimas
ilias.apalodimas at linaro.org
Tue May 17 11:24:04 CEST 2022
Hi Eddie,
Thanks for the patches. I am currently traveling so apologies for
the slow replies. This one looks good, I'll have a look at the rest
once I get back
On Fri, 13 May 2022 at 19:30, Eddie James <eajames at linux.ibm.com> wrote:
>
> Requesting the locality uses the timeout values, so they need
> to be set beforehand.
>
> Signed-off-by: Eddie James <eajames at linux.ibm.com>
> ---
> drivers/tpm/tpm2_tis_core.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/tpm/tpm2_tis_core.c b/drivers/tpm/tpm2_tis_core.c
> index 51392c4584..985a816219 100644
> --- a/drivers/tpm/tpm2_tis_core.c
> +++ b/drivers/tpm/tpm2_tis_core.c
> @@ -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 |
> --
> 2.27.0
>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
More information about the U-Boot
mailing list