Commit | Line | Data |
---|---|---|
bc28248e RK |
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 | ||
292b293c MZ |
13 | #include <linux/interrupt.h> |
14 | ||
bc28248e RK |
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 | ||
bc28248e | 22 | #ifdef CONFIG_LOCAL_TIMERS |
f32f4ce2 RK |
23 | |
24 | #ifdef CONFIG_HAVE_ARM_TWD | |
25 | ||
26 | #include "smp_twd.h" | |
27 | ||
28af690a | 28 | #define local_timer_stop(c) twd_timer_stop((c)) |
f32f4ce2 RK |
29 | |
30 | #else | |
31 | ||
bc28248e | 32 | /* |
28af690a | 33 | * Stop the local timer |
bc28248e | 34 | */ |
28af690a | 35 | void local_timer_stop(struct clock_event_device *); |
bc28248e | 36 | |
f32f4ce2 RK |
37 | #endif |
38 | ||
bc28248e RK |
39 | /* |
40 | * Setup a local timer interrupt for a CPU. | |
41 | */ | |
af90f10d | 42 | int local_timer_setup(struct clock_event_device *); |
bc28248e | 43 | |
af90f10d SS |
44 | #else |
45 | ||
46 | static inline int local_timer_setup(struct clock_event_device *evt) | |
47 | { | |
48 | return -ENXIO; | |
49 | } | |
28af690a MZ |
50 | |
51 | static inline void local_timer_stop(struct clock_event_device *evt) | |
52 | { | |
53 | } | |
bc28248e RK |
54 | #endif |
55 | ||
56 | #endif |