]> git.sur5r.net Git - u-boot/commitdiff
arm64: timer: Create timer_get_bootus for bootstage support
authorMichal Simek <michal.simek@xilinx.com>
Tue, 15 May 2018 14:47:02 +0000 (16:47 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 24 May 2018 02:06:41 +0000 (22:06 -0400)
Implement timer_get_boot_us() based on available functions to support
bootstage command.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/cpu/armv8/generic_timer.c

index 303ba3c00efbe05ca65cc1eacdba16b117bfe2e1..bf07a706a029d5ac54b774a099806b99945eb789 100644 (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();
+}