blob: 553da5f4ba1c912f022b106991a039756834d093 [file] [log] [blame]
Zhi-zhou Zhange0d6df52012-10-16 15:02:08 +02001/*
2 * (C) Copyright 2003
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Zhi-zhou Zhange0d6df52012-10-16 15:02:08 +02006 */
7
8#include <common.h>
9#include <asm/mipsregs.h>
10
Thomas Langerc37c9802015-01-14 18:44:00 +000011unsigned long notrace timer_read_counter(void)
Zhi-zhou Zhange0d6df52012-10-16 15:02:08 +020012{
Thomas Langerc37c9802015-01-14 18:44:00 +000013 return read_c0_count();
Zhi-zhou Zhange0d6df52012-10-16 15:02:08 +020014}
15
Thomas Langerc37c9802015-01-14 18:44:00 +000016ulong notrace get_tbclk(void)
Zhi-zhou Zhange0d6df52012-10-16 15:02:08 +020017{
Thomas Langerc37c9802015-01-14 18:44:00 +000018 return CONFIG_SYS_MIPS_TIMER_FREQ;
Zhi-zhou Zhange0d6df52012-10-16 15:02:08 +020019}