From d522f38c7bfccdc4af71bcad133aec20096f3f6c Mon Sep 17 00:00:00 2001 From: Rob Barnes Date: Mon, 12 Sep 2022 06:31:47 -0600 Subject: timer: Change timer util functions to 64-bit Since mono_time is now 64-bit, the utility functions interfacing with mono_time should also be 64-bit so precision isn't lost. Fixed build errors related to printing the now int64_t result of stopwatch_duration_[m|u]secs in various places. BUG=b:237082996 BRANCH=All TEST=Boot dewatt Change-Id: I169588f5e14285557f2d03270f58f4c07c0154d5 Signed-off-by: Rob Barnes Reviewed-on: https://review.coreboot.org/c/coreboot/+/66170 Tested-by: build bot (Jenkins) Reviewed-by: Werner Zeh Reviewed-by: Raul Rangel Reviewed-by: Yu-Ping Wu --- src/drivers/spi/spi_flash.c | 2 +- src/drivers/spi/tpm/tpm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/drivers/spi') diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c index 9934f55e49..5d78b6124b 100644 --- a/src/drivers/spi/spi_flash.c +++ b/src/drivers/spi/spi_flash.c @@ -212,7 +212,7 @@ int spi_flash_cmd_poll_bit(const struct spi_flash *flash, unsigned long timeout, return 0; } while (!stopwatch_expired(&sw)); - printk(BIOS_WARNING, "SF: timeout at %ld msec after %d attempts\n", + printk(BIOS_WARNING, "SF: timeout at %lld msec after %d attempts\n", stopwatch_duration_msecs(&sw), attempt); return -1; diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c index 5645e57d82..68f9588d53 100644 --- a/src/drivers/spi/tpm/tpm.c +++ b/src/drivers/spi/tpm/tpm.c @@ -390,14 +390,14 @@ static enum cb_err tpm2_claim_locality(void) break; } - printk(BIOS_INFO, "TPM ready after %ld ms\n", + printk(BIOS_INFO, "TPM ready after %lld ms\n", stopwatch_duration_msecs(&sw)); return CB_SUCCESS; } while (!stopwatch_expired(&sw)); printk(BIOS_ERR, - "Failed to claim locality 0 after %ld ms, status: %#x\n", + "Failed to claim locality 0 after %lld ms, status: %#x\n", stopwatch_duration_msecs(&sw), access); return CB_ERR; -- cgit v1.2.3