Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: drivers/tpm/slb9635_i2c/ifx_v05.c

Issue 6683023: Add Infineon v05 TPM driver (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/u-boot-next.git@chromeos-v2010.09
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
+}
+

Powered by Google App Engine
This is Rietveld 408576698