ARM: gic: fix irq_alloc_descs handling for sparse irq
[pandora-kernel.git] / arch / arm / include / asm / localtimer.h
1 /*
2  *  arch/arm/include/asm/localtimer.h
3  *
4  *  Copyright (C) 2004-2005 ARM Ltd.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10 #ifndef __ASM_ARM_LOCALTIMER_H
11 #define __ASM_ARM_LOCALTIMER_H
12
13 #include <linux/interrupt.h>
14
15 struct clock_event_device;
16
17 /*
18  * Setup a per-cpu timer, whether it be a local timer or dummy broadcast
19  */
20 void percpu_timer_setup(void);
21
22 #ifdef CONFIG_LOCAL_TIMERS
23
24 #ifdef CONFIG_HAVE_ARM_TWD
25
26 #include "smp_twd.h"
27
28 #define local_timer_stop(c)     twd_timer_stop((c))
29
30 #else
31
32 /*
33  * Stop the local timer
34  */
35 void local_timer_stop(struct clock_event_device *);
36
37 #endif
38
39 /*
40  * Setup a local timer interrupt for a CPU.
41  */
42 int local_timer_setup(struct clock_event_device *);
43
44 #else
45
46 static inline int local_timer_setup(struct clock_event_device *evt)
47 {
48         return -ENXIO;
49 }
50
51 static inline void local_timer_stop(struct clock_event_device *evt)
52 {
53 }
54 #endif
55
56 #endif