diff options
author | Tom Wai-Hong Tam <waihong@chromium.org> | 2011-07-11 16:37:31 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:58:49 -0700 |
commit | 78453835fffdaf5004872adde7e2efc7961ab493 (patch) | |
tree | 6dc8dfd3598be208e8c5255344422e94a2e47aa0 /lib/vbexport | |
parent | 03e10753a91e32932f7e841bc0e61d78498341db (diff) |
CHROMIUM: Remove duplicated tlcl_stub library.
Remove lib/chromeos/tlcl_stub.c (old APIs with renamed function names,
patched in http://gerrit.chromium.org/gerrit/3833)
Move lib/vbexport/tlcl_stub -> lib/chromeos/tlcl_stub.c
BUG=chromium-os:17303
TEST=emerge-tegra2_seaboard chromeos-u-boot without error
Change-Id: I62f0eb3baa6d5b737deae19e47b7fffe5c5ba794
Reviewed-on: http://gerrit.chromium.org/gerrit/3848
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
Diffstat (limited to 'lib/vbexport')
-rw-r--r-- | lib/vbexport/Makefile | 1 | ||||
-rw-r--r-- | lib/vbexport/tlcl_stub.c | 63 |
2 files changed, 0 insertions, 64 deletions
diff --git a/lib/vbexport/Makefile b/lib/vbexport/Makefile index dd06bf0323..7d654fabef 100644 --- a/lib/vbexport/Makefile +++ b/lib/vbexport/Makefile @@ -18,7 +18,6 @@ COBJS-$(CONFIG_VBOOT_WRAPPER) += keyboard.o COBJS-$(CONFIG_VBOOT_WRAPPER) += load_firmware.o COBJS-$(CONFIG_VBOOT_WRAPPER) += misc.o COBJS-$(CONFIG_VBOOT_WRAPPER) += nvstorage.o -COBJS-$(CONFIG_VBOOT_WRAPPER) += tlcl_stub.o COBJS-$(CONFIG_VBOOT_WRAPPER) += utility.o COBJS := $(COBJS-y) diff --git a/lib/vbexport/tlcl_stub.c b/lib/vbexport/tlcl_stub.c deleted file mode 100644 index 3caa22fd76..0000000000 --- a/lib/vbexport/tlcl_stub.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - */ - -#include <common.h> -#include <config.h> -#include <tpm.h> - -/* Import the header files from vboot_reference. */ -#include <tss_constants.h> -#include <vboot_api.h> - -VbError_t VbExTpmInit(void) -{ -/* TODO According to FDT, select the real TPM path or just returning success. */ -#ifdef CONFIG_HARDWARE_TPM - if (tis_init()) - return TPM_E_IOERROR; - /* tpm_lite lib doesn't call VbExTpmOpene after VbExTpmInit. */ - return VbExTpmOpen(); -#endif - return TPM_SUCCESS; -} - -VbError_t VbExTpmClose(void) -{ -#ifdef CONFIG_HARDWARE_TPM - if (tis_close()) - return TPM_E_IOERROR; -#endif - return TPM_SUCCESS; -} - -VbError_t VbExTpmOpen(void) -{ -#ifdef CONFIG_HARDWARE_TPM - if (tis_open()) - return TPM_E_IOERROR; -#endif - return TPM_SUCCESS; -} - -VbError_t VbExTpmSendReceive(const uint8_t* request, uint32_t request_length, - uint8_t* response, uint32_t* response_length) -{ -#ifdef CONFIG_HARDWARE_TPM - if (tis_sendrecv(request, request_length, response, response_length)) - return TPM_E_IOERROR; -#else - /* Make a successful response */ - uint8_t successful_response[10] = - {0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0}; - memcpy(response, successful_response, 10); - *response_length = 10; -#endif - return TPM_SUCCESS; -} |