summaryrefslogtreecommitdiff
path: root/src/cpu/qemu-x86
diff options
context:
space:
mode:
authorWerner Zeh <werner.zeh@siemens.com>2021-10-11 15:27:12 +0200
committerFelix Held <felix-coreboot@felixheld.de>2021-10-25 16:11:55 +0000
commit92ab611c7055dc33aca822e098e19baa84eb975a (patch)
tree54e83d41e50dcd71cbcdc870c4a6c4b436757305 /src/cpu/qemu-x86
parent299649a31c7bccf5b7102b37e8f8bf0f151280f7 (diff)
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> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58240 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/cpu/qemu-x86')
0 files changed, 0 insertions, 0 deletions