Pull bugzilla-9429 into release branch
[wrt350n-kernel.git] / include / asm-avr32 / timex.h
blob5e44ecb3ce0cf63cc97a348227464a05312f66b8
1 /*
2 * Copyright (C) 2004-2006 Atmel Corporation
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8 #ifndef __ASM_AVR32_TIMEX_H
9 #define __ASM_AVR32_TIMEX_H
12 * This is the frequency of the timer used for Linux's timer interrupt.
13 * The value should be defined as accurate as possible or under certain
14 * circumstances Linux timekeeping might become inaccurate or fail.
16 * For many system the exact clockrate of the timer isn't known but due to
17 * the way this value is used we can get away with a wrong value as long
18 * as this value is:
20 * - a multiple of HZ
21 * - a divisor of the actual rate
23 * 500000 is a good such cheat value.
25 * The obscure number 1193182 is the same as used by the original i8254
26 * time in legacy PC hardware; the chip is never found in AVR32 systems.
28 #define CLOCK_TICK_RATE 500000 /* Underlying HZ */
30 typedef unsigned long cycles_t;
32 static inline cycles_t get_cycles (void)
34 return 0;
37 extern int read_current_timer(unsigned long *timer_value);
38 #define ARCH_HAS_READ_CURRENT_TIMER 1
40 #endif /* __ASM_AVR32_TIMEX_H */