1 // SPDX-License-Identifier: GPL-2.0+
4 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
5 * Marius Groeger <mgroeger@sysgo.de>
8 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
9 * Alex Zuepke <azu@sysgo.de>
15 ulong get_timer (ulong base)
17 return get_timer_masked ();
20 void __udelay (unsigned long usec)
25 ulong get_timer_masked (void)
30 void udelay_masked (unsigned long usec)
41 tmo = usec * CONFIG_SYS_HZ;
45 endtime = get_timer_masked () + tmo;
48 ulong now = get_timer_masked ();
54 * This function is derived from PowerPC code (read timebase as long long).
55 * On ARM it just returns the timer value.
57 unsigned long long get_ticks(void)
63 * This function is derived from PowerPC code (timebase clock frequency).
64 * On ARM it returns the number of timer ticks per second.
66 ulong get_tbclk (void)