summaryrefslogtreecommitdiff
path: root/drivers/tpm/tpm_tis_i2c.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tpm/tpm_tis_i2c.h')
-rw-r--r--drivers/tpm/tpm_tis_i2c.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/tpm/tpm_tis_i2c.h b/drivers/tpm/tpm_tis_i2c.h
index 2a4ad77..0fec464 100644
--- a/drivers/tpm/tpm_tis_i2c.h
+++ b/drivers/tpm/tpm_tis_i2c.h
@@ -33,7 +33,14 @@ enum tpm_timeout {
#define TPM_RSP_SIZE_BYTE 2
#define TPM_RSP_RC_BYTE 6
-struct tpm_chip;
+/* Max buffer size supported by our tpm */
+#define TPM_DEV_BUFSIZE 1260
+
+enum i2c_chip_type {
+ SLB9635,
+ SLB9645,
+ UNKNOWN,
+};
struct tpm_chip {
int is_open;
@@ -44,6 +51,9 @@ struct tpm_chip {
int locality;
unsigned long timeout_a, timeout_b, timeout_c, timeout_d; /* msec */
unsigned long duration[3]; /* msec */
+ struct udevice *dev;
+ u8 buf[TPM_DEV_BUFSIZE + sizeof(u8)]; /* Max buffer size + addr */
+ enum i2c_chip_type chip_type;
};
struct tpm_input_header {
@@ -102,9 +112,4 @@ struct tpm_cmd_t {
union tpm_cmd_params params;
} __packed;
-struct udevice;
-int tpm_vendor_init(struct udevice *dev);
-
-void tpm_vendor_cleanup(struct tpm_chip *chip);
-
#endif