dm: tpm: Convert I2C driver to driver model

Convert the tpm_tis_i2c driver to use driver model and update boards which
use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
diff --git a/drivers/tpm/tpm_tis_i2c.h b/drivers/tpm/tpm_tis_i2c.h
index 02cc2eb..3b510d1 100644
--- a/drivers/tpm/tpm_tis_i2c.h
+++ b/drivers/tpm/tpm_tis_i2c.h
@@ -37,9 +37,6 @@
 #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 @@
 };
 
 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 @@
  */
 #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 @@
 #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