summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2018-05-15 16:47:02 +0200
committerTom Rini <trini@konsulko.com>2018-05-23 22:06:41 -0400
commitd0f855f221307dcbaeeef5a58c5ce816d0af6750 (patch)
tree20ca0ca36551c74040c8631c5ceee63b18572c5b /arch
parent9de4f9592928029a65f628fa109a4761282d8466 (diff)
downloadu-boot-d0f855f221307dcbaeeef5a58c5ce816d0af6750.tar.gz
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv8/generic_timer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c
index 303ba3c00e..bf07a706a0 100644
--- a/arch/arm/cpu/armv8/generic_timer.c
+++ b/arch/arm/cpu/armv8/generic_timer.c
@@ -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();
+}