highres_timer.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * include/asm-v850/highres_timer.h -- High resolution timing routines
  3. *
  4. * Copyright (C) 2001,03 NEC Electronics Corporation
  5. * Copyright (C) 2001,03 Miles Bader <miles@gnu.org>
  6. *
  7. * This file is subject to the terms and conditions of the GNU General
  8. * Public License. See the file COPYING in the main directory of this
  9. * archive for more details.
  10. *
  11. * Written by Miles Bader <miles@gnu.org>
  12. */
  13. #ifndef __V850_HIGHRES_TIMER_H__
  14. #define __V850_HIGHRES_TIMER_H__
  15. #ifndef __ASSEMBLY__
  16. #include <linux/time.h>
  17. #endif
  18. #include <asm/entry.h>
  19. /* Frequency of the `slow ticks' (one tick each time the fast-tick
  20. counter overflows). */
  21. #define HIGHRES_TIMER_SLOW_TICK_RATE 25
  22. /* Which timer in the V850E `Timer D' we use. */
  23. #define HIGHRES_TIMER_TIMER_D_UNIT 3
  24. #ifndef __ASSEMBLY__
  25. extern void highres_timer_start (void), highres_timer_stop (void);
  26. extern void highres_timer_reset (void);
  27. extern void highres_timer_read_ticks (u32 *slow_ticks, u32 *fast_ticks);
  28. extern void highres_timer_ticks_to_timeval (u32 slow_ticks, u32 fast_ticks,
  29. struct timeval *tv);
  30. extern void highres_timer_read (struct timeval *tv);
  31. #endif /* !__ASSEMBLY__ */
  32. #endif /* __V850_HIGHRES_TIMER_H__ */