From mboxrd@z Thu Jan 1 00:00:00 1970 From: sjg at google.com Date: Wed, 5 Dec 2018 15:10:54 -0800 Subject: [U-Boot] [PATCH 09/21] tpm: Remove use of build-time TPM versions In-Reply-To: <20181124042944.239106-10-sjg@chromium.org> References: <20181124042944.239106-10-sjg@chromium.org> <20181124042944.239106-1-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de There is only one place in the code which assumes at build-time that we are using either a v1 or a v2 TPM. Fix this up and add a new function to return the version of a TPM. Supported TPM versions (v1 and v2) can be enabled independently and it is possible to use both versions at once. This is useful for sandbox when running tests. Signed-off-by: Simon Glass --- include/tpm-common.h | 11 +++++++++++ lib/tpm-common.c | 7 +++++++ lib/tpm-v1.c | 22 +++++++++++----------- 3 files changed, 29 insertions(+), 11 deletions(-) Applied to u-boot-dm/master, thanks!