summaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm-interface.c
diff options
context:
space:
mode:
authorJarkko Sakkinen2014-12-12 20:46:39 +0100
committerPeter Huewe2015-01-17 14:00:12 +0100
commit30fc8d138e9123f374a3c3867e7c7c5cd4004941 (patch)
treeba7d83a8271e9cc9fe57864c97cfcb28d5484423 /drivers/char/tpm/tpm-interface.c
parenttpm: TPM 2.0 baseline support (diff)
downloadkernel-qcow2-linux-30fc8d138e9123f374a3c3867e7c7c5cd4004941.tar.gz
kernel-qcow2-linux-30fc8d138e9123f374a3c3867e7c7c5cd4004941.tar.xz
kernel-qcow2-linux-30fc8d138e9123f374a3c3867e7c7c5cd4004941.zip
tpm: TPM 2.0 CRB Interface
tpm_crb is a driver for TPM 2.0 Command Response Buffer (CRB) Interface as defined in PC Client Platform TPM Profile (PTP) Specification. Only polling and single locality is supported as these are the limitations of the available hardware, Platform Trust Techonlogy (PTT) in Haswell CPUs. The driver always applies CRB with ACPI start because PTT reports using only ACPI start as start method but as a result of my testing it requires also CRB start. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Jasob Gunthorpe <jason.gunthorpe@obsidianresearch.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Diffstat (limited to 'drivers/char/tpm/tpm-interface.c')
-rw-r--r--drivers/char/tpm/tpm-interface.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index 20cf94d31386..bf53a3771da5 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -901,6 +901,9 @@ int tpm_pm_suspend(struct device *dev)
if (chip == NULL)
return -ENODEV;
+ if (chip->flags & TPM_CHIP_FLAG_TPM2)
+ return tpm2_shutdown(chip, TPM2_SU_CLEAR);
+
/* for buggy tpm, flush pcrs with extend to selected dummy */
if (tpm_suspend_pcr) {
cmd.header.in = pcrextend_header;