diff options
author | Simon Glass <sjg@chromium.org> | 2023-03-10 12:47:15 -0800 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-03-13 13:53:01 +0100 |
commit | 4f9a8f33f0ab5acdcfa7fafc29bb2a16883e9801 (patch) | |
tree | fb253644dd33607d17d7e99b58e819c7f7cea64a /drivers/timer | |
parent | 40b8afe6f6920eb951b7a1b9ef2766606632ccd8 (diff) | |
download | u-boot-4f9a8f33f0ab5acdcfa7fafc29bb2a16883e9801.tar.gz u-boot-4f9a8f33f0ab5acdcfa7fafc29bb2a16883e9801.tar.bz2 u-boot-4f9a8f33f0ab5acdcfa7fafc29bb2a16883e9801.zip |
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 <sjg@chromium.org>
Diffstat (limited to 'drivers/timer')
-rw-r--r-- | drivers/timer/tsc_timer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c index 192c7b71a5..f86a0b8692 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; |