xref: /openbmc/u-boot/arch/mips/cpu/time.c (revision e8f80a5a)
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * (C) Copyright 2003
4  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5  */
6 
7 #include <common.h>
8 #include <asm/mipsregs.h>
9 
timer_read_counter(void)10 unsigned long notrace timer_read_counter(void)
11 {
12 	return read_c0_count();
13 }
14 
get_tbclk(void)15 ulong notrace get_tbclk(void)
16 {
17 	return CONFIG_SYS_MIPS_TIMER_FREQ;
18 }
19