Attention is currently required from: Patrick Rudolph, Paul Menzel, Christian Walter, Angel Pons, Arthur Heymans, Kyösti Mälkki. Hello Patrick Rudolph, Paul Menzel, Christian Walter, Angel Pons, Arthur Heymans,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/58240
to look at the new patch set (#2).
Change subject: drivers/pc80/tpm: Use stopwatch for timeout-loops ......................................................................
drivers/pc80/tpm: Use stopwatch for timeout-loops
There are manual timeout-loops which use a fixed value and udelay(). In all cases there is a debug printk() inside this loop which, when enabled, takes way longer than the counted microsecond delay. This leads to the result that e.g. a 1 second delay takes nearly an eternity if the debug messages are enabled due to the longer function execution time.
This patch uses the stopwatch scheme for the timeout-loops which still makes sure that the timeout period is maintained while it takes longer function calls like printk() into account. In order to keep the minimum delay between two register accesses on the TPM keep the udelay(1)-call.
TEST=Enable TPM debug messages on a board where the TPM hits a timeout by failure and make sure that the debug messages occur in the log just in the timeout period. It still works as expected if the debug messages are disabled.
Change-Id: I8fd261c9d60a9a60509c847dbc4983bc05f41d48 Signed-off-by: Werner Zeh werner.zeh@siemens.com --- M src/drivers/pc80/tpm/tis.c 1 file changed, 19 insertions(+), 17 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/40/58240/2