2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2003-03-27 12:09:35 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2003
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2019-12-28 17:44:59 +00:00
|
|
|
#include <time.h>
|
2008-06-05 13:28:59 +00:00
|
|
|
#include <asm/mipsregs.h>
|
2003-03-27 12:09:35 +00:00
|
|
|
|
2015-01-14 18:44:00 +00:00
|
|
|
unsigned long notrace timer_read_counter(void)
|
2003-03-27 12:09:35 +00:00
|
|
|
{
|
2015-01-14 18:44:00 +00:00
|
|
|
return read_c0_count();
|
2003-03-27 12:09:35 +00:00
|
|
|
}
|
|
|
|
|
2020-05-14 09:59:05 +00:00
|
|
|
#if defined(CONFIG_SYS_MIPS_TIMER_FREQ)
|
2019-12-23 20:53:56 +00:00
|
|
|
ulong notrace __weak get_tbclk(void)
|
2003-03-27 12:09:35 +00:00
|
|
|
{
|
2015-01-14 18:44:00 +00:00
|
|
|
return CONFIG_SYS_MIPS_TIMER_FREQ;
|
2003-03-27 12:09:35 +00:00
|
|
|
}
|
2020-05-14 09:59:05 +00:00
|
|
|
#endif
|