summaryrefslogtreecommitdiff
path: root/drivers/tpm/tpm_tis_i2c.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-08-22 18:31:25 -0600
committerSimon Glass <sjg@chromium.org>2015-08-31 07:57:27 -0600
commit13932b09bb19898a5c64bf7a48448855200c63f5 (patch)
treed4a988d41ef225edf8150d17a2464ac9f844fe01 /drivers/tpm/tpm_tis_i2c.h
parent7c73537e8e4a296bb2780c1fadb2b82cd2c38185 (diff)
tpm: tpm_tis_i2c: Merge struct tpm_dev into tpm_chip
There are too many structures storing the same sort of information. Move the fields from struct tpm_dev into struct tpm_chip and remove the former struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
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 2a4ad774293..0fec4640d85 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