summaryrefslogtreecommitdiff
path: root/lib/tpm_api.c
diff options
context:
space:
mode:
authorRaymond Mao <raymond.mao@linaro.org>2025-01-27 06:58:46 -0800
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2025-01-28 08:58:41 +0200
commit6d8e52a6e350e1dbf450d02fccdb2ac2b0c036e4 (patch)
tree0c416059b146175926a4a6414df061cd4a9268bd /lib/tpm_api.c
parenta517796cfa5d8f4ca2f0c11c78c24a08a102c047 (diff)
tpm: add TPM2_Shutdown command
TPM2_shutdown command is sharing same structure and logics with TPM2_startup, thus this patch extends the existing startup APIs and cmd functions to support shutdown instead of created new ones. Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib/tpm_api.c')
-rw-r--r--lib/tpm_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tpm_api.c b/lib/tpm_api.c
index 39a5121e302..576d601e5ff 100644
--- a/lib/tpm_api.c
+++ b/lib/tpm_api.c
@@ -28,7 +28,7 @@ u32 tpm_startup(struct udevice *dev, enum tpm_startup_type mode)
case TPM_ST_DEACTIVATED:
return -EINVAL;
}
- return tpm2_startup(dev, type);
+ return tpm2_startup(dev, true, type);
} else {
return -ENOSYS;
}
@@ -60,7 +60,7 @@ u32 tpm_resume(struct udevice *dev)
if (tpm_is_v1(dev))
return tpm1_startup(dev, TPM_ST_STATE);
else if (tpm_is_v2(dev))
- return tpm2_startup(dev, TPM2_SU_STATE);
+ return tpm2_startup(dev, true, TPM2_SU_STATE);
else
return -ENOSYS;
}