mirror of
https://xff.cz/git/u-boot/
synced 2025-11-01 19:05:51 +01:00
x86: timer: Set up the timer in timer_early_get_count()
This function can be called before the timer is set up. Make sure that the init function is called so that it works correctly. This is needed so that bootstage can work correctly in TPL. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -461,6 +461,8 @@ unsigned long notrace timer_early_get_rate(void)
|
||||
|
||||
u64 notrace timer_early_get_count(void)
|
||||
{
|
||||
tsc_timer_ensure_setup(true);
|
||||
|
||||
return rdtsc() - gd->arch.tsc_base;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user