X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=lib%2Ftime.c;h=f37a6628d6e80d56e36d4cbaab4f0481a3a3048f;hb=3e5ce7ceeb940926518378ff31913b263d41c354;hp=b001745203e85c2c6f944e5d470291660eae0af6;hpb=2431492aef1de33bd222c97ecc131a338d9c454e;p=u-boot diff --git a/lib/time.c b/lib/time.c index b001745203..f37a6628d6 100644 --- a/lib/time.c +++ b/lib/time.c @@ -69,9 +69,9 @@ ulong notrace get_tbclk(void) return timer_get_rate(gd->timer); } -unsigned long notrace timer_read_counter(void) +uint64_t notrace get_ticks(void) { - unsigned long count; + u64 count; int ret; ret = dm_timer_init(); @@ -84,7 +84,8 @@ unsigned long notrace timer_read_counter(void) return count; } -#endif /* CONFIG_TIMER */ + +#else /* !CONFIG_TIMER */ uint64_t __weak notrace get_ticks(void) { @@ -97,6 +98,8 @@ uint64_t __weak notrace get_ticks(void) return ((uint64_t)gd->timebase_h << 32) | gd->timebase_l; } +#endif /* CONFIG_TIMER */ + /* Returns time in milliseconds */ static uint64_t notrace tick_to_time(uint64_t tick) {