diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-02-16 04:28:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-16 11:13:59 -0500 |
commit | e9e2cdb412412326c4827fc78ba27f410d837e6e (patch) | |
tree | cd4ca03e6bdc3691619024492fb9414427b2f813 /include/asm-i386/hpet.h | |
parent | 79bf2bb335b85db25d27421c798595a2fa2a0e82 (diff) |
[PATCH] clockevents: i386 drivers
Add clockevent drivers for i386: lapic (local) and PIT/HPET (global). Update
the timer IRQ to call into the PIT/HPET driver's event handler and the
lapic-timer IRQ to call into the lapic clockevent driver. The assignement of
timer functionality is delegated to the core framework code and replaces the
compile and runtime evalution in do_timer_interrupt_hook()
Use the clockevents broadcast support and implement the lapic_broadcast
function for ACPI.
No changes to existing functionality.
[ kdump fix from Vivek Goyal <vgoyal@in.ibm.com> ]
[ fixes based on review feedback from Arjan van de Ven <arjan@infradead.org> ]
Cleanups-from: Adrian Bunk <bunk@stusta.de>
Build-fixes-from: Andrew Morton <akpm@osdl.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-i386/hpet.h')
-rw-r--r-- | include/asm-i386/hpet.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/asm-i386/hpet.h b/include/asm-i386/hpet.h index e47be9a56cc2..fc03cf9de5c4 100644 --- a/include/asm-i386/hpet.h +++ b/include/asm-i386/hpet.h | |||
@@ -90,16 +90,19 @@ | |||
90 | #define HPET_MIN_PERIOD (100000UL) | 90 | #define HPET_MIN_PERIOD (100000UL) |
91 | #define HPET_TICK_RATE (HZ * 100000UL) | 91 | #define HPET_TICK_RATE (HZ * 100000UL) |
92 | 92 | ||
93 | extern unsigned long hpet_tick; /* hpet clks count per tick */ | ||
94 | extern unsigned long hpet_address; /* hpet memory map physical address */ | 93 | extern unsigned long hpet_address; /* hpet memory map physical address */ |
95 | extern int hpet_use_timer; | 94 | extern int is_hpet_enabled(void); |
96 | 95 | ||
96 | #ifdef CONFIG_X86_64 | ||
97 | extern unsigned long hpet_tick; /* hpet clks count per tick */ | ||
98 | extern int hpet_use_timer; | ||
97 | extern int hpet_rtc_timer_init(void); | 99 | extern int hpet_rtc_timer_init(void); |
98 | extern int hpet_enable(void); | 100 | extern int hpet_enable(void); |
99 | extern int hpet_reenable(void); | ||
100 | extern int is_hpet_enabled(void); | ||
101 | extern int is_hpet_capable(void); | 101 | extern int is_hpet_capable(void); |
102 | extern int hpet_readl(unsigned long a); | 102 | extern int hpet_readl(unsigned long a); |
103 | #else | ||
104 | extern int hpet_enable(void); | ||
105 | #endif | ||
103 | 106 | ||
104 | #ifdef CONFIG_HPET_EMULATE_RTC | 107 | #ifdef CONFIG_HPET_EMULATE_RTC |
105 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); | 108 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); |
@@ -110,5 +113,10 @@ extern int hpet_rtc_dropped_irq(void); | |||
110 | extern int hpet_rtc_timer_init(void); | 113 | extern int hpet_rtc_timer_init(void); |
111 | extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id); | 114 | extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id); |
112 | #endif /* CONFIG_HPET_EMULATE_RTC */ | 115 | #endif /* CONFIG_HPET_EMULATE_RTC */ |
116 | |||
117 | #else | ||
118 | |||
119 | static inline int hpet_enable(void) { return 0; } | ||
120 | |||
113 | #endif /* CONFIG_HPET_TIMER */ | 121 | #endif /* CONFIG_HPET_TIMER */ |
114 | #endif /* _I386_HPET_H */ | 122 | #endif /* _I386_HPET_H */ |