From 3e5cefcc45d7ef7da9fd9b6ecc499a05f8134039 Mon Sep 17 00:00:00 2001 From: Sergii Dmytruk Date: Tue, 1 Nov 2022 00:48:43 +0200 Subject: security/tpm: support compiling in multiple TPM drivers Starting from here CONFIG_TPM1 and CONFIG_TPM2 are no longer mutually exclusive. Change-Id: I44c5a1d825afe414c2f5c2c90f4cfe41ba9bef5f Ticket: https://ticket.coreboot.org/issues/433 Signed-off-by: Sergii Dmytruk Reviewed-on: https://review.coreboot.org/c/coreboot/+/69162 Reviewed-by: Julius Werner Tested-by: build bot (Jenkins) --- src/drivers/spi/tpm/tis.c | 2 +- src/drivers/spi/tpm/tpm.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/drivers/spi/tpm') diff --git a/src/drivers/spi/tpm/tis.c b/src/drivers/spi/tpm/tis.c index 89ea985da8..b954a123f0 100644 --- a/src/drivers/spi/tpm/tis.c +++ b/src/drivers/spi/tpm/tis.c @@ -40,7 +40,7 @@ static tpm_result_t tpm_sendrecv(const uint8_t *sendbuf, size_t sbuf_size, return TPM_SUCCESS; } -tis_sendrecv_fn tis_probe(enum tpm_family *family) +tis_sendrecv_fn spi_tis_probe(enum tpm_family *family) { struct spi_slave spi; struct tpm2_info info; diff --git a/src/drivers/spi/tpm/tpm.h b/src/drivers/spi/tpm/tpm.h index 0d238e8011..d6e0e74227 100644 --- a/src/drivers/spi/tpm/tpm.h +++ b/src/drivers/spi/tpm/tpm.h @@ -4,6 +4,7 @@ #define __COREBOOT_SRC_DRIVERS_SPI_TPM_TPM_H #include +#include #include #include #include @@ -44,4 +45,6 @@ size_t tpm2_process_command(const void *tpm2_command, size_t command_size, /* Get information about previously initialized TPM device. */ void tpm2_get_info(struct tpm2_info *info); +tis_sendrecv_fn spi_tis_probe(enum tpm_family *family); + #endif /* ! __COREBOOT_SRC_DRIVERS_SPI_TPM_TPM_H */ -- cgit v1.2.3