From: Simon Glass Date: Fri, 10 Mar 2023 20:47:15 +0000 (-0800) Subject: efi: Use a fixed value for the timer clock X-Git-Tag: v2023.07~72^2~35^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f9a8f33f0ab5acdcfa7fafc29bb2a16883e9801;p=platform%2Fkernel%2Fu-boot.git efi: Use a fixed value for the timer clock It is not yet clear how to read the timer via EFI. The current value seems much too high on a Framework laptop I tried. Adjust it to a lower hard-coded value for now. Signed-off-by: Simon Glass --- diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c index 192c7b7..f86a0b8 100644 --- a/drivers/timer/tsc_timer.c +++ b/drivers/timer/tsc_timer.c @@ -404,6 +404,15 @@ static void tsc_timer_ensure_setup(bool early) if (!gd->arch.clock_rate) { unsigned long fast_calibrate; + /** + * There is no obvious way to obtain this information from EFI + * boot services. This value was measured on a Framework Laptop + * which has a 12th Gen Intel Core + */ + if (IS_ENABLED(CONFIG_EFI_APP)) { + fast_calibrate = 2750; + goto done; + } fast_calibrate = native_calibrate_tsc(); if (fast_calibrate) goto done;