From 7758b47e3be128ab8c1c3fecb63b8f0054351ee0 Mon Sep 17 00:00:00 2001 From: Grzegorz Bernacki Date: Wed, 14 Jun 2023 12:01:32 +0000 Subject: drivers/tpm: Move tis_plat_irq_status to cr50 driver tis_plat_irq_status() function is used only by Google TPM. It should be moved to drivers/tpm/cr50.c. The name of the function was changed to cr50_plat_irq_status(). BUG=b:277787305 TEST=Build all affected platforms Change-Id: I78dc39f2c7b44232b06947d3dfe6afa52807ced8 Signed-off-by: Grzegorz Bernacki Reviewed-on: https://review.coreboot.org/c/coreboot/+/75917 Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai Reviewed-by: Raul Rangel --- src/drivers/spi/tpm/tpm.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src/drivers/spi/tpm/tpm.c') diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c index 976a8d894e..5bb56db867 100644 --- a/src/drivers/spi/tpm/tpm.c +++ b/src/drivers/spi/tpm/tpm.c @@ -61,23 +61,6 @@ void tpm2_get_info(struct tpm2_info *info) *info = tpm_info; } -__weak int tis_plat_irq_status(void) -{ - static int warning_displayed; - - if (!CONFIG(TPM_GOOGLE)) - dead_code(); - - if (!warning_displayed) { - printk(BIOS_WARNING, "%s() not implemented, wasting 10ms to wait on" - " Cr50!\n", __func__); - warning_displayed = 1; - } - mdelay(10); - - return 1; -} - /* * Each TPM2 SPI transaction starts the same: CS is asserted, the 4 byte * header is sent to the TPM, the master waits til TPM is ready to continue. @@ -421,7 +404,7 @@ int tpm2_init(struct spi_slave *spi_if) /* Clear any pending IRQs. */ if (CONFIG(TPM_GOOGLE)) - tis_plat_irq_status(); + cr50_plat_irq_status(); /* * 150 ms should be enough to synchronize with the TPM even under the -- cgit v1.2.3