Zhi-zhou Zhang | e0d6df5 | 2012-10-16 15:02:08 +0200 | [diff] [blame] | 1 | /* |
2 | * (C) Copyright 2003 | ||||
3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | ||||
4 | * | ||||
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Zhi-zhou Zhang | e0d6df5 | 2012-10-16 15:02:08 +0200 | [diff] [blame] | 6 | */ |
7 | |||||
8 | #include <common.h> | ||||
9 | #include <asm/mipsregs.h> | ||||
10 | |||||
Thomas Langer | c37c980 | 2015-01-14 18:44:00 +0000 | [diff] [blame^] | 11 | unsigned long notrace timer_read_counter(void) |
Zhi-zhou Zhang | e0d6df5 | 2012-10-16 15:02:08 +0200 | [diff] [blame] | 12 | { |
Thomas Langer | c37c980 | 2015-01-14 18:44:00 +0000 | [diff] [blame^] | 13 | return read_c0_count(); |
Zhi-zhou Zhang | e0d6df5 | 2012-10-16 15:02:08 +0200 | [diff] [blame] | 14 | } |
15 | |||||
Thomas Langer | c37c980 | 2015-01-14 18:44:00 +0000 | [diff] [blame^] | 16 | ulong notrace get_tbclk(void) |
Zhi-zhou Zhang | e0d6df5 | 2012-10-16 15:02:08 +0200 | [diff] [blame] | 17 | { |
Thomas Langer | c37c980 | 2015-01-14 18:44:00 +0000 | [diff] [blame^] | 18 | return CONFIG_SYS_MIPS_TIMER_FREQ; |
Zhi-zhou Zhang | e0d6df5 | 2012-10-16 15:02:08 +0200 | [diff] [blame] | 19 | } |