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+
16 ulong get_timer (ulong base)
18 return get_timer_masked ();
21 void __udelay (unsigned long usec)
26 ulong get_timer_masked (void)
31 void udelay_masked (unsigned long usec)
42 tmo = usec * CONFIG_SYS_HZ;
46 endtime = get_timer_masked () + tmo;
49 ulong now = get_timer_masked ();
55 * This function is derived from PowerPC code (read timebase as long long).
56 * On ARM it just returns the timer value.
58 unsigned long long get_ticks(void)
64 * This function is derived from PowerPC code (timebase clock frequency).
65 * On ARM it returns the number of timer ticks per second.
67 ulong get_tbclk (void)