From: Eddie James <eajames@linux.ibm.com>
To: u-boot@lists.denx.de
Cc: ilias.apalodimas@linaro.org, Eddie James <eajames@linux.ibm.com>
Subject: [PATCH 1/2] tpm: core: Set timeouts before requesting locality
Date: Fri, 13 May 2022 13:29:59 -0500 [thread overview]
Message-ID: <20220513183000.47392-2-eajames@linux.ibm.com> (raw)
In-Reply-To: <20220513183000.47392-1-eajames@linux.ibm.com>
Requesting the locality uses the timeout values, so they need
to be set beforehand.
Signed-off-by: Eddie James <eajames@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
next prev parent reply other threads:[~2022-05-13 18:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 18:29 [PATCH 0/2] tpm: Add support for TPMv2.x I2C chips Eddie James
2022-05-13 18:29 ` Eddie James [this message]
2022-05-17 9:24 ` [PATCH 1/2] tpm: core: Set timeouts before requesting locality Ilias Apalodimas
2022-05-19 0:27 ` Joel Stanley
2022-05-13 18:30 ` [PATCH 2/2] tpm: add support for TPMv2.x I2C chips Eddie James
2022-05-19 0:26 ` Joel Stanley
2022-05-23 6:12 ` Ilias Apalodimas
2022-05-23 13:19 ` Eddie James
2022-05-23 13:24 ` Ilias Apalodimas
2022-05-27 7:26 ` Joel Stanley
2022-05-27 7:41 ` Ilias Apalodimas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220513183000.47392-2-eajames@linux.ibm.com \
--to=eajames@linux.ibm.com \
--cc=ilias.apalodimas@linaro.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox