diff options
| author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-05-16 07:14:21 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-05-17 14:16:41 -0400 |
| commit | f32f4ce25745209f16a5a6cef7442144b596c68a (patch) | |
| tree | 76083f10ee56c82177669bb100358ea2818f8f5a /arch/arm/include/asm | |
| parent | a8cbcd92bd4bf893085eddf7f58e63ea98503d94 (diff) | |
[ARM] smp: allow re-use of realview localtimer TWD support
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm')
| -rw-r--r-- | arch/arm/include/asm/hardware/arm_twd.h | 21 | ||||
| -rw-r--r-- | arch/arm/include/asm/localtimer.h | 12 | ||||
| -rw-r--r-- | arch/arm/include/asm/smp_twd.h | 12 |
3 files changed, 24 insertions, 21 deletions
diff --git a/arch/arm/include/asm/hardware/arm_twd.h b/arch/arm/include/asm/hardware/arm_twd.h deleted file mode 100644 index e521b70713c..00000000000 --- a/arch/arm/include/asm/hardware/arm_twd.h +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | #ifndef __ASM_HARDWARE_TWD_H | ||
| 2 | #define __ASM_HARDWARE_TWD_H | ||
| 3 | |||
| 4 | #define TWD_TIMER_LOAD 0x00 | ||
| 5 | #define TWD_TIMER_COUNTER 0x04 | ||
| 6 | #define TWD_TIMER_CONTROL 0x08 | ||
| 7 | #define TWD_TIMER_INTSTAT 0x0C | ||
| 8 | |||
| 9 | #define TWD_WDOG_LOAD 0x20 | ||
| 10 | #define TWD_WDOG_COUNTER 0x24 | ||
| 11 | #define TWD_WDOG_CONTROL 0x28 | ||
| 12 | #define TWD_WDOG_INTSTAT 0x2C | ||
| 13 | #define TWD_WDOG_RESETSTAT 0x30 | ||
| 14 | #define TWD_WDOG_DISABLE 0x34 | ||
| 15 | |||
| 16 | #define TWD_TIMER_CONTROL_ENABLE (1 << 0) | ||
| 17 | #define TWD_TIMER_CONTROL_ONESHOT (0 << 1) | ||
| 18 | #define TWD_TIMER_CONTROL_PERIODIC (1 << 1) | ||
| 19 | #define TWD_TIMER_CONTROL_IT_ENABLE (1 << 2) | ||
| 20 | |||
| 21 | #endif | ||
diff --git a/arch/arm/include/asm/localtimer.h b/arch/arm/include/asm/localtimer.h index 3f8c9ebb646..50c7e7cfd67 100644 --- a/arch/arm/include/asm/localtimer.h +++ b/arch/arm/include/asm/localtimer.h | |||
| @@ -24,6 +24,16 @@ asmlinkage void do_local_timer(struct pt_regs *); | |||
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | #ifdef CONFIG_LOCAL_TIMERS | 26 | #ifdef CONFIG_LOCAL_TIMERS |
| 27 | |||
| 28 | #ifdef CONFIG_HAVE_ARM_TWD | ||
| 29 | |||
| 30 | #include "smp_twd.h" | ||
| 31 | |||
| 32 | #define local_timer_ack() twd_timer_ack() | ||
| 33 | #define local_timer_stop() twd_timer_stop() | ||
| 34 | |||
| 35 | #else | ||
| 36 | |||
| 27 | /* | 37 | /* |
| 28 | * Platform provides this to acknowledge a local timer IRQ. | 38 | * Platform provides this to acknowledge a local timer IRQ. |
| 29 | * Returns true if the local timer IRQ is to be processed. | 39 | * Returns true if the local timer IRQ is to be processed. |
| @@ -35,6 +45,8 @@ int local_timer_ack(void); | |||
| 35 | */ | 45 | */ |
| 36 | void local_timer_stop(void); | 46 | void local_timer_stop(void); |
| 37 | 47 | ||
| 48 | #endif | ||
| 49 | |||
| 38 | /* | 50 | /* |
| 39 | * Setup a local timer interrupt for a CPU. | 51 | * Setup a local timer interrupt for a CPU. |
| 40 | */ | 52 | */ |
diff --git a/arch/arm/include/asm/smp_twd.h b/arch/arm/include/asm/smp_twd.h new file mode 100644 index 00000000000..7be0978b262 --- /dev/null +++ b/arch/arm/include/asm/smp_twd.h | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #ifndef __ASMARM_SMP_TWD_H | ||
| 2 | #define __ASMARM_SMP_TWD_H | ||
| 3 | |||
| 4 | struct clock_event_device; | ||
| 5 | |||
| 6 | extern void __iomem *twd_base; | ||
| 7 | |||
| 8 | void twd_timer_stop(void); | ||
| 9 | int twd_timer_ack(void); | ||
| 10 | void twd_timer_setup(struct clock_event_device *); | ||
| 11 | |||
| 12 | #endif | ||
