From 411023af720e37ae932981b1c8da91fc3867ddb3 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Tue, 18 Oct 2022 14:31:50 -0500 Subject: drivers/tpm: Move TPM init to end of device init phase Boards which use an I2C TPM and do not use vboot will not have the I2C bus initialized/ready at the start of the device init phase. If TPM init is called before the bus, init will fail with I2C transfer timeouts and a significantly lengthened boot time. Resolves: https://ticket.coreboot.org/issues/429 TEST=build/boot google/reef w/o vboot, verify successful TPM init. Change-Id: Ic47e465db1c06d8b79a1f0a06906843149b6dacd Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/68550 Reviewed-by: Alexandru Stan Reviewed-by: Julius Werner Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) Reviewed-by: Karthik Ramasubramanian --- src/drivers/tpm/tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/drivers/tpm/tpm.c') diff --git a/src/drivers/tpm/tpm.c b/src/drivers/tpm/tpm.c index ce1a2b7670..3b582c84ab 100644 --- a/src/drivers/tpm/tpm.c +++ b/src/drivers/tpm/tpm.c @@ -10,4 +10,4 @@ static void init_tpm_dev(void *unused) tpm_setup(s3resume); } -BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_ENTRY, init_tpm_dev, NULL); +BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, init_tpm_dev, NULL); -- cgit v1.2.3