summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorJon Murphy <jpmurphy@google.com>2023-09-15 07:58:08 -0600
committerMartin L Roth <gaumless@gmail.com>2023-09-18 15:45:02 +0000
commita7c64d746573a63126c4fd7e3c8c72ffda0c1d60 (patch)
treecc5b6d628a5b06ab571ca438050719345c2460a3 /src/drivers
parent34ec32d54bcaa5337e067b6d4dd1a12c187240d9 (diff)
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 <jpmurphy@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77943 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/pc80/tpm/tis.c17
1 files changed, 3 insertions, 14 deletions
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;
@@ -609,19 +611,6 @@ static u32 tis_readresponse(u8 *buffer, size_t *len)
}
/*
- * 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()
*
* Requests access to locality 0 for the caller.