summaryrefslogtreecommitdiff
path: root/src/drivers/spi/tpm/tpm.c
diff options
context:
space:
mode:
authorGrzegorz Bernacki <bernacki@google.com>2023-06-14 12:01:32 +0000
committerFelix Held <felix-coreboot@felixheld.de>2023-07-06 16:16:43 +0000
commit7758b47e3be128ab8c1c3fecb63b8f0054351ee0 (patch)
tree626cdc57c8c0eb979e336af506da07b4e4ea77e0 /src/drivers/spi/tpm/tpm.c
parent15d75aa999709ab2006b816f7c0335b52147f945 (diff)
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 <bernacki@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75917 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/drivers/spi/tpm/tpm.c')
-rw-r--r--src/drivers/spi/tpm/tpm.c19
1 files changed, 1 insertions, 18 deletions
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