summaryrefslogtreecommitdiffstats
path: root/payloads/libpayload/drivers/timer/arm64_arch_timer.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2024-02-06 22:52:06 -0800
committerJulius Werner <jwerner@chromium.org>2024-02-08 21:07:13 +0000
commit5ec3deac6b3bd8f8cc16730f2017a7316da816c9 (patch)
treeaed991aa77d35323fd6b01f7e4182cb8616e9fa4 /payloads/libpayload/drivers/timer/arm64_arch_timer.c
parentddc5260e3b4a5fa8a1ff3d8838f8f188fb673786 (diff)
downloadcoreboot-5ec3deac6b3bd8f8cc16730f2017a7316da816c9.tar.gz
coreboot-5ec3deac6b3bd8f8cc16730f2017a7316da816c9.tar.bz2
coreboot-5ec3deac6b3bd8f8cc16730f2017a7316da816c9.zip
libpayload: timer: Revert timer_hz() return type to 64-bits
It seems that reducing the return type of timer_hz() to uint32_t in CB:78888 was a bad idea... some Intel platforms actually use their raw CPU clock for the timestamp counter which can be higher than 4GHz. This patch reverts it back to uint64_t. Also remove the redundant assertion in timer/generic.c since timer_us() itself already does that check. Cq-Depend: chromium:5274555 Change-Id: I471c7de7a28aec5bb965b23525ed579481ac8361 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80320 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Yidi Lin <yidilin@google.com>
Diffstat (limited to 'payloads/libpayload/drivers/timer/arm64_arch_timer.c')
-rw-r--r--payloads/libpayload/drivers/timer/arm64_arch_timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/timer/arm64_arch_timer.c b/payloads/libpayload/drivers/timer/arm64_arch_timer.c
index b4d2b865aea4..087d9e756553 100644
--- a/payloads/libpayload/drivers/timer/arm64_arch_timer.c
+++ b/payloads/libpayload/drivers/timer/arm64_arch_timer.c
@@ -32,7 +32,7 @@
#include <arch/lib_helpers.h>
#include <libpayload.h>
-uint32_t timer_hz(void)
+uint64_t timer_hz(void)
{
return raw_read_cntfrq_el0();
}