x86: timer: Set up the timer in timer_early_get_count()
authorSimon Glass <sjg@chromium.org>
Mon, 21 Oct 2019 03:31:54 +0000 (21:31 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Sat, 2 Nov 2019 23:20:27 +0000 (07:20 +0800)
commit096c71e34bac7551aa228bbcb9e1c867ad9e5d07
tree66ec4eefc5fa0cadd41cfb0cecde66b0a4a212da
parentc52b5e8e2ce7f4cd3a9116083debd27ef23046d7
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>
drivers/timer/tsc_timer.c