3 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
4 * Marius Groeger <mgroeger@sysgo.de>
7 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
8 * Alex Zuepke <azu@sysgo.de>
10 * SPDX-License-Identifier: GPL-2.0+
21 ulong get_timer (ulong base)
23 return get_timer_masked ();
26 void __udelay (unsigned long usec)
31 ulong get_timer_masked (void)
36 void udelay_masked (unsigned long usec)
47 tmo = usec * CONFIG_SYS_HZ;
51 endtime = get_timer_masked () + tmo;
54 ulong now = get_timer_masked ();
60 * This function is derived from PowerPC code (read timebase as long long).
61 * On ARM it just returns the timer value.
63 unsigned long long get_ticks(void)
69 * This function is derived from PowerPC code (timebase clock frequency).
70 * On ARM it returns the number of timer ticks per second.
72 ulong get_tbclk (void)
76 tbclk = CONFIG_SYS_HZ;