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
14#ifndef __V850_HIGHRES_TIMER_H__
15#define __V850_HIGHRES_TIMER_H__
16
17#ifndef __ASSEMBLY__
18#include <linux/time.h>
19#endif
20
21#include <asm/entry.h>
22
23
24/* Frequency of the `slow ticks' (one tick each time the fast-tick
25   counter overflows).  */
26#define HIGHRES_TIMER_SLOW_TICK_RATE	25
27
28/* Which timer in the V850E `Timer D' we use.  */
29#define HIGHRES_TIMER_TIMER_D_UNIT	3
30
31
32#ifndef __ASSEMBLY__
33
34extern void highres_timer_start (void), highres_timer_stop (void);
35extern void highres_timer_reset (void);
36extern void highres_timer_read_ticks (u32 *slow_ticks, u32 *fast_ticks);
37extern void highres_timer_ticks_to_timeval (u32 slow_ticks, u32 fast_ticks,
38					    struct timeval *tv);
39extern void highres_timer_read (struct timeval *tv);
40
41#endif /* !__ASSEMBLY__ */
42
43
44#endif /* __V850_HIGHRES_TIMER_H__ */
45