diff options
author | Sergii Dmytruk <sergii.dmytruk@3mdeb.com> | 2022-10-29 18:55:24 +0300 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-12-21 14:46:54 +0000 |
commit | 86f845ad0d864f44c21db964f0fdb213c41a152c (patch) | |
tree | 6ab3493a44d5f3ecf1b65ae4ab46dd68c3f33cd6 /src/drivers/i2c/tpm/tpm.h | |
parent | bf3c648fa7f6cdd946698a2ec6584102b53e4c4a (diff) |
drivers/i2c/tpm: splice tpm_vendor_specific struct
Move `locality` field to `struct tpm_inf_dev` and put the rest directly
into `tpm_chip`.
Change-Id: Ic3644290963aca9f8dc7cd8ef754352865ef8d2c
Ticket: https://ticket.coreboot.org/issues/433
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68990
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/drivers/i2c/tpm/tpm.h')
-rw-r--r-- | src/drivers/i2c/tpm/tpm.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/drivers/i2c/tpm/tpm.h b/src/drivers/i2c/tpm/tpm.h index 868b306c36..d4176cc511 100644 --- a/src/drivers/i2c/tpm/tpm.h +++ b/src/drivers/i2c/tpm/tpm.h @@ -37,22 +37,16 @@ enum tpm_timeout { #define TPM_DATA_FIFO(l) (0x0005 | ((l) << 4)) #define TPM_DID_VID(l) (0x0006 | ((l) << 4)) -struct tpm_chip; - -struct tpm_vendor_specific { +struct tpm_chip { + int is_open; uint8_t req_complete_mask; uint8_t req_complete_val; uint8_t req_canceled; - int (*recv)(struct tpm_chip *, uint8_t *, size_t); - int (*send)(struct tpm_chip *, uint8_t *, size_t); - void (*cancel)(struct tpm_chip *); - uint8_t (*status)(struct tpm_chip *); - int locality; -}; -struct tpm_chip { - int is_open; - struct tpm_vendor_specific vendor; + int (*recv)(uint8_t *buf, size_t len); + int (*send)(uint8_t *buf, size_t len); + void (*cancel)(void); + uint8_t (*status)(void); }; /* ---------- Interface for TPM vendor ------------ */ |