time.c 390 B

123456789101112131415161718192021
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * (C) Copyright 2003
  4. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  5. */
  6. #include <common.h>
  7. #include <time.h>
  8. #include <asm/mipsregs.h>
  9. unsigned long notrace timer_read_counter(void)
  10. {
  11. return read_c0_count();
  12. }
  13. #if defined(CONFIG_SYS_MIPS_TIMER_FREQ)
  14. ulong notrace __weak get_tbclk(void)
  15. {
  16. return CONFIG_SYS_MIPS_TIMER_FREQ;
  17. }
  18. #endif