[U-Boot] [PATCH] armv8: Allow SoCs to override the generic timer
Stephen Warren
swarren at wwwdotorg.org
Thu Jul 23 00:56:10 CEST 2015
From: Thierry Reding <treding at nvidia.com>
Some SoCs come with a custom timer interface, so allow them to use that
instead.
swarren notes: I did consider reworking this patch so the Makefile only
compiles generic_timer.c ifndef CONFIG_SYS_TIMER_COUNTER. However, I can
foresee a time where generic_timer.c contains both routines to implement
U-Boot's internal timer, and to perform other operations related to the
generic timer, such as initializing the CNTFRQ register for a booted OS.
If that happens, this version of the change will result in simpler future
patches.
Signed-off-by: Thierry Reding <treding at nvidia.com>
Signed-off-by: Tom Warren <twarren at nvidia.com>
Signed-off-by: Stephen Warren <swarren 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 8e60baebc534..98a865cf6ffc 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()
*/
@@ -40,3 +41,4 @@ unsigned long timer_read_counter(void)
#endif
return cntpct;
}
+#endif
--
1.9.1
More information about the U-Boot
mailing list