1
2#ifndef _ASM_TIMEX_H
3#define _ASM_TIMEX_H
4
5#include <asm/mipsregs.h>
6
7#define CLOCK_TICK_RATE	1193180 /* Underlying HZ */
8#define CLOCK_TICK_FACTOR	20	/* Factor of both 1000000 and CLOCK_TICK_RATE */
9#define FINETUNE ((((((long)LATCH * HZ - CLOCK_TICK_RATE) << SHIFT_HZ) * \
10	(1000000/CLOCK_TICK_FACTOR) / (CLOCK_TICK_RATE/CLOCK_TICK_FACTOR)) \
11		<< (SHIFT_SCALE-SHIFT_HZ)) / HZ)
12
13/*
14 * Standard way to access the cycle counter.
15 * Currently only used on SMP for scheduling.
16 *
17 * Only the low 32 bits are available as a continuously counting entity.
18 * But this only means we'll force a reschedule every 8 seconds or so,
19 * which isn't an evil thing.
20 *
21 * We know that all SMP capable CPUs have cycle counters.
22 */
23
24typedef unsigned int cycles_t;
25extern cycles_t cacheflush_time;
26
27static inline cycles_t get_cycles (void)
28{
29	return read_c0_count();
30}
31
32#define vxtime_lock()		do {} while (0)
33#define vxtime_unlock()		do {} while (0)
34
35#endif /*  _ASM_TIMEX_H */
36