From 51f00c1704e505f51a02a3687e4384231ce8ae20 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 18 Nov 2018 14:22:26 -0700 Subject: tpm: Export the open/close functions At present these functions are not accessible outside the TPM library, but in some cases we need to call them. Export them in the header file and add a define for the SHA1 digest size. Also adjust tpm_open() to call tpm_close() first so that the TPM is in a known state before opening (e.g. by a previous phase of U-Boot). Signed-off-by: Simon Glass --- lib/tpm-utils.h | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'lib/tpm-utils.h') diff --git a/lib/tpm-utils.h b/lib/tpm-utils.h index a9cb7dc..ac95f26 100644 --- a/lib/tpm-utils.h +++ b/lib/tpm-utils.h @@ -19,24 +19,6 @@ #define tpm_u32(x) tpm_u16((x) >> 16), tpm_u16((x) & 0xFFFF) /** - * tpm_open() - Request access to locality 0 for the caller - * - * After all commands have been completed the caller is supposed to - * call tpm_close(). - * - * Returns 0 on success, -ve on failure. - */ -int tpm_open(struct udevice *dev); - -/** - * tpm_close() - Close the current session - * - * Releasing the locked locality. Returns 0 on success, -ve 1 on - * failure (in case lock removal did not succeed). - */ -int tpm_close(struct udevice *dev); - -/** * Pack data into a byte string. The data types are specified in * the format string: 'b' means unsigned byte, 'w' unsigned word, * 'd' unsigned double word, and 's' byte string. The data are a -- cgit v1.1