blob: af324f77cefd22e6a2763309ce2595eb647f7d9c [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
wdenkbb1b8262003-03-27 12:09:35 +00002/*
3 * (C) Copyright 2003
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
wdenkbb1b8262003-03-27 12:09:35 +00005 */
6
7#include <common.h>
Shinya Kuribayashi5fcf6d32008-06-05 22:28:59 +09008#include <asm/mipsregs.h>
wdenkbb1b8262003-03-27 12:09:35 +00009
Thomas Langerc37c9802015-01-14 18:44:00 +000010unsigned long notrace timer_read_counter(void)
wdenkbb1b8262003-03-27 12:09:35 +000011{
Thomas Langerc37c9802015-01-14 18:44:00 +000012 return read_c0_count();
wdenkbb1b8262003-03-27 12:09:35 +000013}
14
Thomas Langerc37c9802015-01-14 18:44:00 +000015ulong notrace get_tbclk(void)
wdenkbb1b8262003-03-27 12:09:35 +000016{
Thomas Langerc37c9802015-01-14 18:44:00 +000017 return CONFIG_SYS_MIPS_TIMER_FREQ;
wdenkbb1b8262003-03-27 12:09:35 +000018}