Jes Klinke has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43741 )
Change subject: drivers/spi/tpm: Enable long cr50 ready pulses for Tiger Lake systems ......................................................................
Patch Set 20:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43741/19/src/drivers/spi/tpm/tpm.c File src/drivers/spi/tpm/tpm.c:
https://review.coreboot.org/c/coreboot/+/43741/19/src/drivers/spi/tpm/tpm.c@... PS19, Line 510: if (get_cr50_board_cfg() & CR50_BOARD_CFG_100US_READY_PULSE)
Is tlcl_lib_init() invoked to setup the GSPI controller? If so, setting up the GSPI controller can […]
I do not know how much exactly tlcl_lib_init() does, which this function relies on having been done. But I can see that e.g. tpm2_get_info() in this file does not attempt to initialize the GSPI controller, but assumes that it has already been done.
Also, tpm2_init() in this file takes some parameter, which has to come from outside this library. I do not like having some existing callers provide the argument to tpm2_init(), while having this method know how to get the parameters to call tpm2_init(). If anything, we should change this library to always "know" how to initialize itself, no matter the code path.
It sound as Julius is suggesting a refactoring like that, but I do not want this CL to be coupled to or halfway start such a refactoring.