mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 15:10:26 +09: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:
parent
c52b5e8e2c
commit
096c71e34b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user