Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
wdenk | c021880 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 2 | /* |
3 | * (C) Copyright 2003 | ||||
4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | ||||
wdenk | c021880 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 5 | */ |
6 | |||||
7 | #include <common.h> | ||||
Shinya Kuribayashi | c7e38e4 | 2008-06-05 22:28:59 +0900 | [diff] [blame] | 8 | #include <asm/mipsregs.h> |
wdenk | c021880 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 9 | |
Thomas Langer | a18a477 | 2015-01-14 18:44:00 +0000 | [diff] [blame] | 10 | unsigned long notrace timer_read_counter(void) |
wdenk | c021880 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 11 | { |
Thomas Langer | a18a477 | 2015-01-14 18:44:00 +0000 | [diff] [blame] | 12 | return read_c0_count(); |
wdenk | c021880 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 13 | } |
14 | |||||
Thomas Langer | a18a477 | 2015-01-14 18:44:00 +0000 | [diff] [blame] | 15 | ulong notrace get_tbclk(void) |
wdenk | c021880 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 16 | { |
Thomas Langer | a18a477 | 2015-01-14 18:44:00 +0000 | [diff] [blame] | 17 | return CONFIG_SYS_MIPS_TIMER_FREQ; |
wdenk | c021880 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 18 | } |