aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/mct.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-exynos/mct.c')
-rw-r--r--arch/arm/mach-exynos/mct.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c
index 85b5527d0918..edc4b9488f2f 100644
--- a/arch/arm/mach-exynos/mct.c
+++ b/arch/arm/mach-exynos/mct.c
@@ -21,6 +21,7 @@
21#include <linux/percpu.h> 21#include <linux/percpu.h>
22 22
23#include <asm/hardware/gic.h> 23#include <asm/hardware/gic.h>
24#include <asm/localtimer.h>
24 25
25#include <plat/cpu.h> 26#include <plat/cpu.h>
26 27
@@ -375,7 +376,7 @@ static struct irqaction mct_tick1_event_irq = {
375 .handler = exynos4_mct_tick_isr, 376 .handler = exynos4_mct_tick_isr,
376}; 377};
377 378
378static void exynos4_mct_tick_init(struct clock_event_device *evt) 379static int __cpuinit exynos4_local_timer_setup(struct clock_event_device *evt)
379{ 380{
380 struct mct_clock_event_device *mevt; 381 struct mct_clock_event_device *mevt;
381 unsigned int cpu = smp_processor_id(); 382 unsigned int cpu = smp_processor_id();
@@ -417,17 +418,11 @@ static void exynos4_mct_tick_init(struct clock_event_device *evt)
417 } else { 418 } else {
418 enable_percpu_irq(IRQ_MCT_LOCALTIMER, 0); 419 enable_percpu_irq(IRQ_MCT_LOCALTIMER, 0);
419 } 420 }
420}
421
422/* Setup the local clock events for a CPU */
423int __cpuinit local_timer_setup(struct clock_event_device *evt)
424{
425 exynos4_mct_tick_init(evt);
426 421
427 return 0; 422 return 0;
428} 423}
429 424
430void local_timer_stop(struct clock_event_device *evt) 425static void exynos4_local_timer_stop(struct clock_event_device *evt)
431{ 426{
432 unsigned int cpu = smp_processor_id(); 427 unsigned int cpu = smp_processor_id();
433 evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt); 428 evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt);
@@ -439,6 +434,11 @@ void local_timer_stop(struct clock_event_device *evt)
439 else 434 else
440 disable_percpu_irq(IRQ_MCT_LOCALTIMER); 435 disable_percpu_irq(IRQ_MCT_LOCALTIMER);
441} 436}
437
438static struct local_timer_ops exynos4_mct_tick_ops __cpuinitdata = {
439 .setup = exynos4_local_timer_setup,
440 .stop = exynos4_local_timer_stop,
441};
442#endif /* CONFIG_LOCAL_TIMERS */ 442#endif /* CONFIG_LOCAL_TIMERS */
443 443
444static void __init exynos4_timer_resources(void) 444static void __init exynos4_timer_resources(void)
@@ -458,6 +458,8 @@ static void __init exynos4_timer_resources(void)
458 WARN(err, "MCT: can't request IRQ %d (%d)\n", 458 WARN(err, "MCT: can't request IRQ %d (%d)\n",
459 IRQ_MCT_LOCALTIMER, err); 459 IRQ_MCT_LOCALTIMER, err);
460 } 460 }
461
462 local_timer_register(&exynos4_mct_tick_ops);
461#endif /* CONFIG_LOCAL_TIMERS */ 463#endif /* CONFIG_LOCAL_TIMERS */
462} 464}
463 465