summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-04-15 07:36:25 -0600
committerTom Rini <trini@konsulko.com>2025-04-15 07:36:25 -0600
commita08425586799374ccded78eb5fdef6e2235e1ad9 (patch)
tree551e822f76699989df95cb9444d8f0f71c76398c
parentcce329426f61ad9c42775128d2c995ccd2ebdcfc (diff)
parent275777bc94cf1673b38d4d5438dfb07df7902603 (diff)
Merge tag 'tpm-master-14042025' of https://source.denx.de/u-boot/custodians/u-boot-tpm
A small fix for the cr50 which is a TPM but doesn't support all the TPM functionality. Since it deviates from our normal TIS compliant TPMs it can't be started twice since running the selftests twice hangs.
-rw-r--r--drivers/tpm/cr50_i2c.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tpm/cr50_i2c.c b/drivers/tpm/cr50_i2c.c
index 08ec179346e..5b2d5ccb146 100644
--- a/drivers/tpm/cr50_i2c.c
+++ b/drivers/tpm/cr50_i2c.c
@@ -737,9 +737,13 @@ static int cr50_i2c_report_state(struct udevice *dev, char *str, int str_max)
static int cr50_i2c_open(struct udevice *dev)
{
+ struct cr50_priv *priv = dev_get_priv(dev);
char buf[80];
int ret;
+ if (priv->locality != -1)
+ return -EBUSY;
+
ret = process_reset(dev);
if (ret)
return log_msg_ret("reset", ret);