diff options
author | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2017-06-21 09:31:34 +0200 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2017-07-07 09:49:25 +1000 |
commit | 19cbe4f680b48f950246815b891a66eeb67f7410 (patch) | |
tree | 8b1e0fc6a59db5b4e95171522fac6d7f9439defb /drivers/char/tpm/tpm.h | |
parent | 5e572cab92f0bb56ca1e6e5ee4d807663a7ccbad (diff) | |
download | op-kernel-dev-19cbe4f680b48f950246815b891a66eeb67f7410.zip op-kernel-dev-19cbe4f680b48f950246815b891a66eeb67f7410.tar.gz |
tpm: consolidate the TPM startup code
Consolidated all the "manual" TPM startup code to a single function
in order to make code flows a bit cleaner and migrate to tpm_buf.
Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'drivers/char/tpm/tpm.h')
-rw-r--r-- | drivers/char/tpm/tpm.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index cdd2613..71d661a 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -382,10 +382,6 @@ struct tpm_getrandom_in { __be32 num_bytes; } __packed; -struct tpm_startup_in { - __be16 startup_type; -} __packed; - typedef union { struct tpm_readpubek_params_out readpubek_out; u8 readpubek_out_buffer[sizeof(struct tpm_readpubek_params_out)]; @@ -393,7 +389,6 @@ typedef union { struct tpm_pcrread_out pcrread_out; struct tpm_getrandom_in getrandom_in; struct tpm_getrandom_out getrandom_out; - struct tpm_startup_in startup_in; } tpm_cmd_params; struct tpm_cmd_t { @@ -519,6 +514,7 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip, struct tpm_space *space, const void *buf, size_t bufsiz, size_t min_rsp_body_length, unsigned int flags, const char *desc); +int tpm_startup(struct tpm_chip *chip); ssize_t tpm_getcap(struct tpm_chip *chip, u32 subcap_id, cap_t *cap, const char *desc, size_t min_cap_length); int tpm_get_timeouts(struct tpm_chip *); |