summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2022-10-18 14:31:50 -0500
committerFelix Held <felix-coreboot@felixheld.de>2022-10-20 17:23:29 +0000
commitc4c0f00a57af8bd1224a6d5b72084acc44e90250 (patch)
tree458715c69b36b5c67c8433b0a9511c3afe5c3e6d
parentf4c97ea131944c7be940b35361407e4b63a14faf (diff)
downloadcoreboot-c4c0f00a57af8bd1224a6d5b72084acc44e90250.tar.gz
coreboot-c4c0f00a57af8bd1224a6d5b72084acc44e90250.tar.bz2
coreboot-c4c0f00a57af8bd1224a6d5b72084acc44e90250.zip
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 <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68600 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-rw-r--r--src/drivers/tpm/tpm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/tpm/tpm.c b/src/drivers/tpm/tpm.c
index ce1a2b76700b..3b582c84abb9 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);