diff mbox series

[05/11] efi: Use a fixed value for the timer clock

Message ID 20230205194627.203961-6-sjg@chromium.org
State Changes Requested, archived
Delegated to: Heinrich Schuchardt
Headers show
Series video: efi: Improve the EFI-app video console | expand

Commit Message

Simon Glass Feb. 5, 2023, 7:46 p.m. UTC
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>
---

 drivers/timer/tsc_timer.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c
index 50ab4e86dca..44c6cc363e0 100644
--- a/drivers/timer/tsc_timer.c
+++ b/drivers/timer/tsc_timer.c
@@ -404,6 +404,10 @@  static void tsc_timer_ensure_setup(bool early)
 	if (!gd->arch.clock_rate) {
 		unsigned long fast_calibrate;
 
+		if (IS_ENABLED(CONFIG_EFI_APP)) {
+			fast_calibrate = 2750;
+			goto done;
+		}
 		fast_calibrate = native_calibrate_tsc();
 		if (fast_calibrate)
 			goto done;