aboutsummaryrefslogtreecommitdiffstats
path: root/roms/u-boot/arch/mips/cpu/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'roms/u-boot/arch/mips/cpu/time.c')
-rw-r--r--roms/u-boot/arch/mips/cpu/time.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/roms/u-boot/arch/mips/cpu/time.c b/roms/u-boot/arch/mips/cpu/time.c
new file mode 100644
index 000000000..5e7a7144d
--- /dev/null
+++ b/roms/u-boot/arch/mips/cpu/time.c
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2003
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ */
+
+#include <common.h>
+#include <time.h>
+#include <asm/mipsregs.h>
+
+unsigned long notrace timer_read_counter(void)
+{
+ return read_c0_count();
+}
+
+#if defined(CONFIG_SYS_MIPS_TIMER_FREQ)
+ulong notrace __weak get_tbclk(void)
+{
+ return CONFIG_SYS_MIPS_TIMER_FREQ;
+}
+#endif