]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/tpm/tpm_tis_i2c.h
tpm: tpm_tis_i2c: Merge struct tpm_dev into tpm_chip
[karo-tx-uboot.git] / drivers / tpm / tpm_tis_i2c.h
index 2a4ad774293df90be2b272bf39622661f0073173..0fec4640d85121272e0b8c616cb40e5807f9850e 100644 (file)
@@ -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