[U-Boot] [PATCH 6/6] armv8: Allow SoCs to override the generic timer

Thierry Reding thierry.reding at gmail.com
Fri Mar 20 12:47:53 CET 2015


From: Thierry Reding <treding at nvidia.com>

Some SoCs come with a custom timer interface, so allow them to use that
instead.

Cc: Albert Aribaud <albert.u.boot at aribaud.net>
Cc: Marc Zyngier <marc.zyngier at arm.com>
Signed-off-by: Thierry Reding <treding at nvidia.com>
---
 arch/arm/cpu/armv8/generic_timer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c
index 223b95e210ed..ab8573fc7cef 100644
--- a/arch/arm/cpu/armv8/generic_timer.c
+++ b/arch/arm/cpu/armv8/generic_timer.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <asm/system.h>
 
+#ifndef CONFIG_SYS_TIMER_COUNTER
 /*
  * Generic timer implementation of get_tbclk()
  */
@@ -29,3 +30,4 @@ unsigned long timer_read_counter(void)
 	asm volatile("mrs %0, cntpct_el0" : "=r" (cntpct));
 	return cntpct;
 }
+#endif
-- 
2.3.2



More information about the U-Boot mailing list