Index: drivers/tpm/slb9635_i2c/ifx_v05.c |
diff --git a/drivers/tpm/slb9635_i2c/ifx_v05.c b/drivers/tpm/slb9635_i2c/ifx_v05.c |
new file mode 100644 |
index 0000000000000000000000000000000000000000..af03e0ac722f67dfc5736e5749b729a62e19f80c |
--- /dev/null |
+++ b/drivers/tpm/slb9635_i2c/ifx_v05.c |
@@ -0,0 +1,38 @@ |
+/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#include <config.h> |
+#include <common.h> |
+#include <i2c.h> |
+#include "tddl.h" |
+ |
+int tpm_init_v05(void) |
+{ |
+ return i2c_probe(0x20); |
+} |
+ |
+int tpm_open_v05(void) |
+{ |
+ if (TDDL_Open()) |
+ return -1; |
+ return 0; |
+} |
+ |
+int tpm_close_v05(void) |
+{ |
+ if (TDDL_Close()) |
+ return -1; |
+ return 0; |
+} |
+ |
+int tpm_sendrecv_v05(const uint8_t *sendbuf, size_t buf_size, |
+ uint8_t *recvbuf, size_t *recv_len) |
+{ |
+ if (TDDL_TransmitData((uint8_t*)sendbuf, (uint32_t)buf_size, recvbuf, |
+ (uint32_t*)recv_len)) |
+ return -1; |
+ return 0; |
+} |
+ |