summaryrefslogtreecommitdiff
path: root/drivers/tpm
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2011-07-27 02:07:18 -0700
committerSimon Glass <sjg@chromium.org>2011-08-29 10:59:15 -0700
commit0ea4598c278003022d5526ba0fb6fcb4bae299a0 (patch)
treee32c5572605cf4987f2d866f4f02aa28d596d28b /drivers/tpm
parentb24dac6b046ad4485a382c0a2bf2b7d58e810840 (diff)
Add a dummy TPM driver
Vboot depends on having a TPM driver in place, but we don't have one implemented yet. This change adds a new empty driver which won't do anything but will get vboot to compile. BUG=chrome-os-partner:4552 TEST=Built for coreboot Change-Id: I2afa4d7b3a5a70fcee76794bad113e7ae7e04d93 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: http://gerrit.chromium.org/gerrit/4845 Reviewed-by: Stefan Reinauer <reinauer@google.com> Tested-by: Gabe Black <gabeblack@chromium.org>
Diffstat (limited to 'drivers/tpm')
-rw-r--r--drivers/tpm/Makefile2
-rw-r--r--drivers/tpm/dummy_tpm.c31
2 files changed, 33 insertions, 0 deletions
diff --git a/drivers/tpm/Makefile b/drivers/tpm/Makefile
index d53c7911ab..3c8c01bb20 100644
--- a/drivers/tpm/Makefile
+++ b/drivers/tpm/Makefile
@@ -19,6 +19,8 @@ COBJS-$(CONFIG_INFINEON_TPM_I2C) = slb9635_i2c.o \
$(IFXDIR)/ifx_v05.o \
$(IFXDIR)/ifx_v03.o
+COBJS-$(CONFIG_DUMMY_TPM) = dummy_tpm.o
+
COBJS := $(COBJS-y)
SRCS := $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
diff --git a/drivers/tpm/dummy_tpm.c b/drivers/tpm/dummy_tpm.c
new file mode 100644
index 0000000000..685968c5ef
--- /dev/null
+++ b/drivers/tpm/dummy_tpm.c
@@ -0,0 +1,31 @@
+/* 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 <tpm.h>
+
+int tis_init(void)
+{
+ printf("tis_init called but not implemented.\n");
+ return 1;
+}
+
+int tis_open(void)
+{
+ printf("tis_open called but not implemented.\n");
+ return 1;
+}
+
+int tis_close(void)
+{
+ printf("tis_close called but not implemented.\n");
+ return 1;
+}
+
+int tis_sendrecv(const uint8_t *sendbuf, size_t send_size, uint8_t *recvbuf,
+ size_t *recv_len)
+{
+ printf("tis_sendrecv called but not implemented.\n");
+ return 1;
+}