All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] armv8: Allow SoCs to override the generic timer
@ 2015-07-22 22:56 Stephen Warren
  2015-07-23 20:18 ` Simon Glass
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Stephen Warren @ 2015-07-22 22:56 UTC (permalink / raw)
  To: u-boot

From: Thierry Reding <treding@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@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-08-02 21:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-22 22:56 [U-Boot] [PATCH] armv8: Allow SoCs to override the generic timer Stephen Warren
2015-07-23 20:18 ` Simon Glass
2015-07-23 20:54 ` Tom Rini
2015-07-28  9:33 ` Thierry Reding
2015-07-28  9:35 ` [U-Boot] [PATCH 1/2] ARM: tegra: Initialize timer earlier Thierry Reding
2015-07-28  9:35   ` [U-Boot] [PATCH 2/2] ARM: tegra: Use architected timer on ARMv8 Thierry Reding
2015-08-02 21:29     ` Simon Glass
2015-07-28 16:08   ` [U-Boot] [PATCH 1/2] ARM: tegra: Initialize timer earlier Stephen Warren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.