]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/tpm/tpm_tis_i2c.h
dm: tpm: Convert I2C driver to driver model
[karo-tx-uboot.git] / drivers / tpm / tpm_tis_i2c.h
index 02cc2eba42543c208f97b9c98be2a19edc62920e..3b510d101e773baf3aa6db107d8e78cc5ca2a6fe 100644 (file)
@@ -37,9 +37,6 @@ enum tpm_timeout {
 #define TPM_RSP_SIZE_BYTE      2
 #define TPM_RSP_RC_BYTE                6
 
-/* Max buffer size supported by our tpm */
-#define TPM_DEV_BUFSIZE                1260
-
 enum i2c_chip_type {
        SLB9635,
        SLB9645,
@@ -47,17 +44,10 @@ enum i2c_chip_type {
 };
 
 struct tpm_chip {
-       bool inited;
        int is_open;
-       u8 req_complete_mask;
-       u8 req_complete_val;
-       u8 req_canceled;
-       int irq;
        int locality;
+       u32 vend_dev;
        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;
 };
 
@@ -129,8 +119,6 @@ struct tpm_cmd_t {
  */
 #define MAX_COUNT_LONG         50
 
-#define TPM_HEADER_SIZE                10
-
 enum tis_access {
        TPM_ACCESS_VALID                = 0x80,
        TPM_ACCESS_ACTIVE_LOCALITY      = 0x20,
@@ -155,10 +143,4 @@ enum tis_status {
 #define        TPM_DATA_FIFO(l)                (0x0005 | ((l) << 4))
 #define        TPM_DID_VID(l)                  (0x0006 | ((l) << 4))
 
-/* Extended error numbers from linux (see errno.h) */
-#define ECANCELED      125     /* Operation Canceled */
-
-/* Timer frequency. Corresponds to msec timer resolution */
-#define HZ             1000
-
 #endif