aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-11-30 08:04:28 -0500
committerTom Rini <trini@konsulko.com>2021-11-30 08:04:28 -0500
commitca819284d35e7b8ed18995ddc78677d8b4d14154 (patch)
treebbafe89fd111f883ee21ab00cd0f35758103cd3d
parentce29c52891d2265f854119c9cc6defcc70b54c07 (diff)
parentc3de051c411e024f9e63ab338071584b9460e8b3 (diff)
downloadu-boot-ca819284d35e7b8ed18995ddc78677d8b4d14154.zip
u-boot-ca819284d35e7b8ed18995ddc78677d8b4d14154.tar.gz
u-boot-ca819284d35e7b8ed18995ddc78677d8b4d14154.tar.bz2
Merge tag 'tpm-30112021' of https://source.denx.de/u-boot/custodians/u-boot-tpmWIP/30Nov2021
TPM2 API fixes Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--drivers/tpm/tpm2_tis_core.c6
-rw-r--r--drivers/tpm/tpm2_tis_mmio.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/tpm/tpm2_tis_core.c b/drivers/tpm/tpm2_tis_core.c
index ec8c730..51392c4 100644
--- a/drivers/tpm/tpm2_tis_core.c
+++ b/drivers/tpm/tpm2_tis_core.c
@@ -378,8 +378,14 @@ out:
int tpm_tis_cleanup(struct udevice *dev)
{
struct tpm_chip *chip = dev_get_priv(dev);
+ int ret;
+
+ ret = tpm_tis_request_locality(dev, 0);
+ if (ret)
+ return ret;
tpm_tis_ready(dev);
+
tpm_tis_release_locality(dev, chip->locality);
return 0;
diff --git a/drivers/tpm/tpm2_tis_mmio.c b/drivers/tpm/tpm2_tis_mmio.c
index f04aab2..a646ce4 100644
--- a/drivers/tpm/tpm2_tis_mmio.c
+++ b/drivers/tpm/tpm2_tis_mmio.c
@@ -120,7 +120,7 @@ static int tpm_tis_remove(struct udevice *dev)
struct tpm_tis_chip_data *drv_data = (void *)dev_get_driver_data(dev);
int ret;
- ret = tpm_tis_cleanup(dev);
+ ret = tpm_tis_cleanup(dev);
iounmap(drv_data->iobase);