arm64: timer: Create timer_get_bootus for bootstage support

Implement timer_get_boot_us() based on available functions to support
bootstage command.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
Michal Simek 2018-05-15 16:47:02 +02:00 committed by Tom Rini
parent 9de4f95929
commit d0f855f221

View File

@ -61,3 +61,10 @@ unsigned long usec2ticks(unsigned long usec)
return ticks;
}
ulong timer_get_boot_us(void)
{
u64 val = get_ticks() * 1000000;
return val / get_tbclk();
}