From a7c64d746573a63126c4fd7e3c8c72ffda0c1d60 Mon Sep 17 00:00:00 2001 From: Jon Murphy Date: Fri, 15 Sep 2023 07:58:08 -0600 Subject: drivers/pc80/tpm: Rename tis_probe to tis_init tis_init calls into tis_probe and returns an error or success, simplify the call stack by removing the current tis_init implementation and renaming tis_probe to tis_init. BUG=None TEST=builds Change-Id: I8e58eda66a44abf5858123cf9bcf620626f1b880 Signed-off-by: Jon Murphy Reviewed-on: https://review.coreboot.org/c/coreboot/+/77943 Tested-by: build bot (Jenkins) Reviewed-by: Tim Van Patten --- src/drivers/pc80/tpm/tis.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/drivers/pc80/tpm') diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c index 1ae6f1dc92..5bb566297c 100644 --- a/src/drivers/pc80/tpm/tis.c +++ b/src/drivers/pc80/tpm/tis.c @@ -369,12 +369,14 @@ static int tis_command_ready(u8 locality) } /* + * tis_init() + * * Probe the TPM device and try determining its manufacturer/device name. * * Returns 0 on success (the device is found or was found during an earlier * invocation) or TPM_DRIVER_ERR if the device is not found. */ -static u32 tis_probe(void) +int tis_init(void) { const char *device_name = "unknown"; const char *vendor_name = device_name; @@ -608,19 +610,6 @@ static u32 tis_readresponse(u8 *buffer, size_t *len) return 0; } -/* - * tis_init() - * - * Initialize the TPM device. Returns 0 on success or TPM_DRIVER_ERR on - * failure (in case device probing did not succeed). - */ -int tis_init(void) -{ - if (tis_probe()) - return TPM_DRIVER_ERR; - return 0; -} - /* * tis_open() * -- cgit v1.2.3