summaryrefslogtreecommitdiff
path: root/lib/time.c
diff options
context:
space:
mode:
authorDarwin Rambo <drambo@broadcom.com>2013-12-19 15:06:12 -0800
committerTom Rini <trini@ti.com>2014-01-24 16:59:06 -0500
commitde351d6be6868270db21ed8a0f89d3ef703bc18e (patch)
treeac7f3183bfb5b90a9ac2bd5695ff2eacc45af466 /lib/time.c
parentf28bea0003536976ebe2fb299cfc140702fec489 (diff)
lib: time: add weak timer_init() function
If timer_init() is made a weak stub function, then it allows us to remove several empty timer_init functions for those boards that already have a timer initialized when u-boot starts. Architectures that use the timer framework may also remove the need for timer.c. Signed-off-by: Darwin Rambo <drambo@broadcom.com> Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Diffstat (limited to 'lib/time.c')
-rw-r--r--lib/time.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/time.c b/lib/time.c
index 8085aa40d1..73c3b6ad7f 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -60,6 +60,11 @@ static unsigned long long notrace tick_to_time(uint64_t tick)
return tick;
}
+int __weak timer_init(void)
+{
+ return 0;
+}
+
ulong __weak get_timer(ulong base)
{
return tick_to_time(get_ticks()) - base;