
Currently this timer driver provides timer_get_boot_us() to support the BOOTSTAGE functionality. This patch adds the timer_early functions so that the "normal" timer functions can be used, when CONFIG_TIMER_EARLY is enabled.
timer_get_boot_us() will get removed in a follow-up patch, once the BOOTSTAGE interface is migrated to timer_get_us().
Signed-off-by: Stefan Roese sr@denx.de Cc: Michal Simek michal.simek@xilinx.com Cc: Andre Przywara andre.przywara@arm.com --- arch/arm/cpu/armv8/generic_timer.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c index f27a74b9d09b..01a1a167311e 100644 --- a/arch/arm/cpu/armv8/generic_timer.c +++ b/arch/arm/cpu/armv8/generic_timer.c @@ -115,3 +115,13 @@ ulong timer_get_boot_us(void)
return val / get_tbclk(); } + +unsigned long notrace timer_early_get_rate(void) +{ + return get_tbclk(); +} + +u64 notrace timer_early_get_count(void) +{ + return get_ticks(); +}