aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/timer.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-i386/timer.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-i386/timer.h')
-rw-r--r--include/asm-i386/timer.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/include/asm-i386/timer.h b/include/asm-i386/timer.h
new file mode 100644
index 000000000000..40c54f69780e
--- /dev/null
+++ b/include/asm-i386/timer.h
@@ -0,0 +1,64 @@
1#ifndef _ASMi386_TIMER_H
2#define _ASMi386_TIMER_H
3#include <linux/init.h>
4
5/**
6 * struct timer_ops - used to define a timer source
7 *
8 * @name: name of the timer.
9 * @init: Probes and initializes the timer. Takes clock= override
10 * string as an argument. Returns 0 on success, anything else
11 * on failure.
12 * @mark_offset: called by the timer interrupt.
13 * @get_offset: called by gettimeofday(). Returns the number of microseconds
14 * since the last timer interupt.
15 * @monotonic_clock: returns the number of nanoseconds since the init of the
16 * timer.
17 * @delay: delays this many clock cycles.
18 */
19struct timer_opts {
20 char* name;
21 void (*mark_offset)(void);
22 unsigned long (*get_offset)(void);
23 unsigned long long (*monotonic_clock)(void);
24 void (*delay)(unsigned long);
25};
26
27struct init_timer_opts {
28 int (*init)(char *override);
29 struct timer_opts *opts;
30};
31
32#define TICK_SIZE (tick_nsec / 1000)
33
34extern struct timer_opts* __init select_timer(void);
35extern void clock_fallback(void);
36void setup_pit_timer(void);
37
38/* Modifiers for buggy PIT handling */
39
40extern int pit_latch_buggy;
41
42extern struct timer_opts *cur_timer;
43extern int timer_ack;
44
45/* list of externed timers */
46extern struct timer_opts timer_none;
47extern struct timer_opts timer_pit;
48extern struct init_timer_opts timer_pit_init;
49extern struct init_timer_opts timer_tsc_init;
50#ifdef CONFIG_X86_CYCLONE_TIMER
51extern struct init_timer_opts timer_cyclone_init;
52#endif
53
54extern unsigned long calibrate_tsc(void);
55extern void init_cpu_khz(void);
56#ifdef CONFIG_HPET_TIMER
57extern struct init_timer_opts timer_hpet_init;
58extern unsigned long calibrate_tsc_hpet(unsigned long *tsc_hpet_quotient_ptr);
59#endif
60
61#ifdef CONFIG_X86_PM_TIMER
62extern struct init_timer_opts timer_pmtmr_init;
63#endif
64#endif