Merge branches 'cross-platform/debug_ll' and 'cross-platform/cpu-mapping' into next...
[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 struct clock_event_device;
14
15 /*
16  * Setup a per-cpu timer, whether it be a local timer or dummy broadcast
17  */
18 void percpu_timer_setup(void);
19
20 /*
21  * Called from assembly, this is the local timer IRQ handler
22  */
23 asmlinkage void do_local_timer(struct pt_regs *);
24
25 /*
26  * Called from C code
27  */
28 void handle_local_timer(struct pt_regs *);
29
30 #ifdef CONFIG_LOCAL_TIMERS
31
32 #ifdef CONFIG_HAVE_ARM_TWD
33
34 #include "smp_twd.h"
35
36 #define local_timer_ack()       twd_timer_ack()
37
38 #else
39
40 /*
41  * Platform provides this to acknowledge a local timer IRQ.
42  * Returns true if the local timer IRQ is to be processed.
43  */
44 int local_timer_ack(void);
45
46 #endif
47
48 /*
49  * Setup a local timer interrupt for a CPU.
50  */
51 int local_timer_setup(struct clock_event_device *);
52
53 #else
54
55 static inline int local_timer_setup(struct clock_event_device *evt)
56 {
57         return -ENXIO;
58 }
59 #endif
60
61 #endif