
25 Sep
2019
25 Sep
'19
4:56 p.m.
This function can be called before the timer is set up. Make sure that the init function is called so that it works correctly.
Signed-off-by: Simon Glass sjg@chromium.org ---
drivers/timer/tsc_timer.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c index 9630036bc7f..85bdd95a819 100644 --- a/drivers/timer/tsc_timer.c +++ b/drivers/timer/tsc_timer.c @@ -464,6 +464,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; }
--
2.23.0.444.g18eeb5a265-goog