diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/localtimer.h | 8 | ||||
-rw-r--r-- | arch/arm/kernel/smp.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-msm/timer.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/timer-mpu.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/localtimer.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/localtimer.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-tegra/localtimer.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-ux500/localtimer.c | 3 | ||||
-rw-r--r-- | arch/arm/plat-versatile/localtimer.c | 3 |
9 files changed, 24 insertions, 12 deletions
diff --git a/arch/arm/include/asm/localtimer.h b/arch/arm/include/asm/localtimer.h index 6bc63ab498ce..080d74f8128d 100644 --- a/arch/arm/include/asm/localtimer.h +++ b/arch/arm/include/asm/localtimer.h | |||
@@ -44,8 +44,14 @@ int local_timer_ack(void); | |||
44 | /* | 44 | /* |
45 | * Setup a local timer interrupt for a CPU. | 45 | * Setup a local timer interrupt for a CPU. |
46 | */ | 46 | */ |
47 | void local_timer_setup(struct clock_event_device *); | 47 | int local_timer_setup(struct clock_event_device *); |
48 | 48 | ||
49 | #else | ||
50 | |||
51 | static inline int local_timer_setup(struct clock_event_device *evt) | ||
52 | { | ||
53 | return -ENXIO; | ||
54 | } | ||
49 | #endif | 55 | #endif |
50 | 56 | ||
51 | #endif | 57 | #endif |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 4539ebcb089f..8fe05ad932e4 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -474,13 +474,12 @@ static void smp_timer_broadcast(const struct cpumask *mask) | |||
474 | #define smp_timer_broadcast NULL | 474 | #define smp_timer_broadcast NULL |
475 | #endif | 475 | #endif |
476 | 476 | ||
477 | #ifndef CONFIG_LOCAL_TIMERS | ||
478 | static void broadcast_timer_set_mode(enum clock_event_mode mode, | 477 | static void broadcast_timer_set_mode(enum clock_event_mode mode, |
479 | struct clock_event_device *evt) | 478 | struct clock_event_device *evt) |
480 | { | 479 | { |
481 | } | 480 | } |
482 | 481 | ||
483 | static void local_timer_setup(struct clock_event_device *evt) | 482 | static void broadcast_timer_setup(struct clock_event_device *evt) |
484 | { | 483 | { |
485 | evt->name = "dummy_timer"; | 484 | evt->name = "dummy_timer"; |
486 | evt->features = CLOCK_EVT_FEAT_ONESHOT | | 485 | evt->features = CLOCK_EVT_FEAT_ONESHOT | |
@@ -492,7 +491,6 @@ static void local_timer_setup(struct clock_event_device *evt) | |||
492 | 491 | ||
493 | clockevents_register_device(evt); | 492 | clockevents_register_device(evt); |
494 | } | 493 | } |
495 | #endif | ||
496 | 494 | ||
497 | void __cpuinit percpu_timer_setup(void) | 495 | void __cpuinit percpu_timer_setup(void) |
498 | { | 496 | { |
@@ -502,7 +500,8 @@ void __cpuinit percpu_timer_setup(void) | |||
502 | evt->cpumask = cpumask_of(cpu); | 500 | evt->cpumask = cpumask_of(cpu); |
503 | evt->broadcast = smp_timer_broadcast; | 501 | evt->broadcast = smp_timer_broadcast; |
504 | 502 | ||
505 | local_timer_setup(evt); | 503 | if (local_timer_setup(evt)) |
504 | broadcast_timer_setup(evt); | ||
506 | } | 505 | } |
507 | 506 | ||
508 | #ifdef CONFIG_HOTPLUG_CPU | 507 | #ifdef CONFIG_HOTPLUG_CPU |
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c index c105d28b53e3..ae85aa951806 100644 --- a/arch/arm/mach-msm/timer.c +++ b/arch/arm/mach-msm/timer.c | |||
@@ -255,7 +255,7 @@ static void __init msm_timer_init(void) | |||
255 | } | 255 | } |
256 | 256 | ||
257 | #ifdef CONFIG_SMP | 257 | #ifdef CONFIG_SMP |
258 | void __cpuinit local_timer_setup(struct clock_event_device *evt) | 258 | int __cpuinit local_timer_setup(struct clock_event_device *evt) |
259 | { | 259 | { |
260 | struct msm_clock *clock = &msm_clocks[MSM_GLOBAL_TIMER]; | 260 | struct msm_clock *clock = &msm_clocks[MSM_GLOBAL_TIMER]; |
261 | 261 | ||
@@ -287,6 +287,7 @@ void __cpuinit local_timer_setup(struct clock_event_device *evt) | |||
287 | gic_enable_ppi(clock->irq.irq); | 287 | gic_enable_ppi(clock->irq.irq); |
288 | 288 | ||
289 | clockevents_register_device(evt); | 289 | clockevents_register_device(evt); |
290 | return 0; | ||
290 | } | 291 | } |
291 | 292 | ||
292 | inline int local_timer_ack(void) | 293 | inline int local_timer_ack(void) |
diff --git a/arch/arm/mach-omap2/timer-mpu.c b/arch/arm/mach-omap2/timer-mpu.c index 954682e64399..09c73dcfc2ac 100644 --- a/arch/arm/mach-omap2/timer-mpu.c +++ b/arch/arm/mach-omap2/timer-mpu.c | |||
@@ -26,9 +26,10 @@ | |||
26 | /* | 26 | /* |
27 | * Setup the local clock events for a CPU. | 27 | * Setup the local clock events for a CPU. |
28 | */ | 28 | */ |
29 | void __cpuinit local_timer_setup(struct clock_event_device *evt) | 29 | int __cpuinit local_timer_setup(struct clock_event_device *evt) |
30 | { | 30 | { |
31 | evt->irq = OMAP44XX_IRQ_LOCALTIMER; | 31 | evt->irq = OMAP44XX_IRQ_LOCALTIMER; |
32 | twd_timer_setup(evt); | 32 | twd_timer_setup(evt); |
33 | return 0; | ||
33 | } | 34 | } |
34 | 35 | ||
diff --git a/arch/arm/mach-s5pv310/localtimer.c b/arch/arm/mach-s5pv310/localtimer.c index 2784036cd8b1..8239c6a684a1 100644 --- a/arch/arm/mach-s5pv310/localtimer.c +++ b/arch/arm/mach-s5pv310/localtimer.c | |||
@@ -18,8 +18,9 @@ | |||
18 | /* | 18 | /* |
19 | * Setup the local clock events for a CPU. | 19 | * Setup the local clock events for a CPU. |
20 | */ | 20 | */ |
21 | void __cpuinit local_timer_setup(struct clock_event_device *evt) | 21 | int __cpuinit local_timer_setup(struct clock_event_device *evt) |
22 | { | 22 | { |
23 | evt->irq = IRQ_LOCALTIMER; | 23 | evt->irq = IRQ_LOCALTIMER; |
24 | twd_timer_setup(evt); | 24 | twd_timer_setup(evt); |
25 | return 0; | ||
25 | } | 26 | } |
diff --git a/arch/arm/mach-shmobile/localtimer.c b/arch/arm/mach-shmobile/localtimer.c index 2111c28b724e..ad9ccc9900c8 100644 --- a/arch/arm/mach-shmobile/localtimer.c +++ b/arch/arm/mach-shmobile/localtimer.c | |||
@@ -18,8 +18,9 @@ | |||
18 | /* | 18 | /* |
19 | * Setup the local clock events for a CPU. | 19 | * Setup the local clock events for a CPU. |
20 | */ | 20 | */ |
21 | void __cpuinit local_timer_setup(struct clock_event_device *evt) | 21 | int __cpuinit local_timer_setup(struct clock_event_device *evt) |
22 | { | 22 | { |
23 | evt->irq = 29; | 23 | evt->irq = 29; |
24 | twd_timer_setup(evt); | 24 | twd_timer_setup(evt); |
25 | return 0; | ||
25 | } | 26 | } |
diff --git a/arch/arm/mach-tegra/localtimer.c b/arch/arm/mach-tegra/localtimer.c index f81ca7cbbc1f..e91d681d45a2 100644 --- a/arch/arm/mach-tegra/localtimer.c +++ b/arch/arm/mach-tegra/localtimer.c | |||
@@ -18,8 +18,9 @@ | |||
18 | /* | 18 | /* |
19 | * Setup the local clock events for a CPU. | 19 | * Setup the local clock events for a CPU. |
20 | */ | 20 | */ |
21 | void __cpuinit local_timer_setup(struct clock_event_device *evt) | 21 | int __cpuinit local_timer_setup(struct clock_event_device *evt) |
22 | { | 22 | { |
23 | evt->irq = IRQ_LOCALTIMER; | 23 | evt->irq = IRQ_LOCALTIMER; |
24 | twd_timer_setup(evt); | 24 | twd_timer_setup(evt); |
25 | return 0; | ||
25 | } | 26 | } |
diff --git a/arch/arm/mach-ux500/localtimer.c b/arch/arm/mach-ux500/localtimer.c index 2288f6a7c518..5ba113309a0b 100644 --- a/arch/arm/mach-ux500/localtimer.c +++ b/arch/arm/mach-ux500/localtimer.c | |||
@@ -21,8 +21,9 @@ | |||
21 | /* | 21 | /* |
22 | * Setup the local clock events for a CPU. | 22 | * Setup the local clock events for a CPU. |
23 | */ | 23 | */ |
24 | void __cpuinit local_timer_setup(struct clock_event_device *evt) | 24 | int __cpuinit local_timer_setup(struct clock_event_device *evt) |
25 | { | 25 | { |
26 | evt->irq = IRQ_LOCALTIMER; | 26 | evt->irq = IRQ_LOCALTIMER; |
27 | twd_timer_setup(evt); | 27 | twd_timer_setup(evt); |
28 | return 0; | ||
28 | } | 29 | } |
diff --git a/arch/arm/plat-versatile/localtimer.c b/arch/arm/plat-versatile/localtimer.c index 83ebee569333..0fb3961999b5 100644 --- a/arch/arm/plat-versatile/localtimer.c +++ b/arch/arm/plat-versatile/localtimer.c | |||
@@ -19,8 +19,9 @@ | |||
19 | /* | 19 | /* |
20 | * Setup the local clock events for a CPU. | 20 | * Setup the local clock events for a CPU. |
21 | */ | 21 | */ |
22 | void __cpuinit local_timer_setup(struct clock_event_device *evt) | 22 | int __cpuinit local_timer_setup(struct clock_event_device *evt) |
23 | { | 23 | { |
24 | evt->irq = IRQ_LOCALTIMER; | 24 | evt->irq = IRQ_LOCALTIMER; |
25 | twd_timer_setup(evt); | 25 | twd_timer_setup(evt); |
26 | return 0; | ||
26 | } | 27 | } |