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 <time.h> 9#include <asm/mipsregs.h> 10 11unsigned long notrace timer_read_counter(void) 12{ 13 return read_c0_count(); 14} 15 16#if defined(CONFIG_SYS_MIPS_TIMER_FREQ) 17ulong notrace __weak get_tbclk(void) 18{ 19 return CONFIG_SYS_MIPS_TIMER_FREQ; 20} 21#endif 22