blob: 553da5f4ba1c912f022b106991a039756834d093 [file] [log] [blame]
wdenkc0218802003-03-27 12:09:35 +00001/*
2 * (C) Copyright 2003
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenkc0218802003-03-27 12:09:35 +00006 */
7
8#include <common.h>
Shinya Kuribayashic7e38e42008-06-05 22:28:59 +09009#include <asm/mipsregs.h>
wdenkc0218802003-03-27 12:09:35 +000010
Thomas Langera18a4772015-01-14 18:44:00 +000011unsigned long notrace timer_read_counter(void)
wdenkc0218802003-03-27 12:09:35 +000012{
Thomas Langera18a4772015-01-14 18:44:00 +000013 return read_c0_count();
wdenkc0218802003-03-27 12:09:35 +000014}
15
Thomas Langera18a4772015-01-14 18:44:00 +000016ulong notrace get_tbclk(void)
wdenkc0218802003-03-27 12:09:35 +000017{
Thomas Langera18a4772015-01-14 18:44:00 +000018 return CONFIG_SYS_MIPS_TIMER_FREQ;
wdenkc0218802003-03-27 12:09:35 +000019}