diff options
Diffstat (limited to 'arch/arm/mach-omap2/timer.c')
-rw-r--r-- | arch/arm/mach-omap2/timer.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index b8ad6e632bb8..afaeff4920ab 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -552,7 +552,7 @@ static inline void __init realtime_counter_init(void) | |||
552 | 552 | ||
553 | #define OMAP_SYS_GP_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ | 553 | #define OMAP_SYS_GP_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ |
554 | clksrc_nr, clksrc_src) \ | 554 | clksrc_nr, clksrc_src) \ |
555 | static void __init omap##name##_gptimer_timer_init(void) \ | 555 | void __init omap##name##_gptimer_timer_init(void) \ |
556 | { \ | 556 | { \ |
557 | omap_dmtimer_init(); \ | 557 | omap_dmtimer_init(); \ |
558 | omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ | 558 | omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ |
@@ -561,7 +561,7 @@ static void __init omap##name##_gptimer_timer_init(void) \ | |||
561 | 561 | ||
562 | #define OMAP_SYS_32K_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ | 562 | #define OMAP_SYS_32K_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ |
563 | clksrc_nr, clksrc_src) \ | 563 | clksrc_nr, clksrc_src) \ |
564 | static void __init omap##name##_sync32k_timer_init(void) \ | 564 | void __init omap##name##_sync32k_timer_init(void) \ |
565 | { \ | 565 | { \ |
566 | omap_dmtimer_init(); \ | 566 | omap_dmtimer_init(); \ |
567 | omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ | 567 | omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ |
@@ -572,33 +572,23 @@ static void __init omap##name##_sync32k_timer_init(void) \ | |||
572 | omap2_sync32k_clocksource_init(); \ | 572 | omap2_sync32k_clocksource_init(); \ |
573 | } | 573 | } |
574 | 574 | ||
575 | #define OMAP_SYS_TIMER(name, clksrc) \ | ||
576 | struct sys_timer omap##name##_timer = { \ | ||
577 | .init = omap##name##_##clksrc##_timer_init, \ | ||
578 | }; | ||
579 | |||
580 | #ifdef CONFIG_ARCH_OMAP2 | 575 | #ifdef CONFIG_ARCH_OMAP2 |
581 | OMAP_SYS_32K_TIMER_INIT(2, 1, OMAP2_32K_SOURCE, "ti,timer-alwon", | 576 | OMAP_SYS_32K_TIMER_INIT(2, 1, OMAP2_32K_SOURCE, "ti,timer-alwon", |
582 | 2, OMAP2_MPU_SOURCE); | 577 | 2, OMAP2_MPU_SOURCE); |
583 | OMAP_SYS_TIMER(2, sync32k); | ||
584 | #endif /* CONFIG_ARCH_OMAP2 */ | 578 | #endif /* CONFIG_ARCH_OMAP2 */ |
585 | 579 | ||
586 | #ifdef CONFIG_ARCH_OMAP3 | 580 | #ifdef CONFIG_ARCH_OMAP3 |
587 | OMAP_SYS_32K_TIMER_INIT(3, 1, OMAP3_32K_SOURCE, "ti,timer-alwon", | 581 | OMAP_SYS_32K_TIMER_INIT(3, 1, OMAP3_32K_SOURCE, "ti,timer-alwon", |
588 | 2, OMAP3_MPU_SOURCE); | 582 | 2, OMAP3_MPU_SOURCE); |
589 | OMAP_SYS_TIMER(3, sync32k); | ||
590 | OMAP_SYS_32K_TIMER_INIT(3_secure, 12, OMAP3_32K_SOURCE, "ti,timer-secure", | 583 | OMAP_SYS_32K_TIMER_INIT(3_secure, 12, OMAP3_32K_SOURCE, "ti,timer-secure", |
591 | 2, OMAP3_MPU_SOURCE); | 584 | 2, OMAP3_MPU_SOURCE); |
592 | OMAP_SYS_TIMER(3_secure, sync32k); | ||
593 | OMAP_SYS_GP_TIMER_INIT(3_gp, 1, OMAP3_MPU_SOURCE, "ti,timer-alwon", | 585 | OMAP_SYS_GP_TIMER_INIT(3_gp, 1, OMAP3_MPU_SOURCE, "ti,timer-alwon", |
594 | 2, OMAP3_MPU_SOURCE); | 586 | 2, OMAP3_MPU_SOURCE); |
595 | OMAP_SYS_TIMER(3_gp, gptimer); | ||
596 | #endif /* CONFIG_ARCH_OMAP3 */ | 587 | #endif /* CONFIG_ARCH_OMAP3 */ |
597 | 588 | ||
598 | #ifdef CONFIG_SOC_AM33XX | 589 | #ifdef CONFIG_SOC_AM33XX |
599 | OMAP_SYS_GP_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon", | 590 | OMAP_SYS_GP_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon", |
600 | 2, OMAP4_MPU_SOURCE); | 591 | 2, OMAP4_MPU_SOURCE); |
601 | OMAP_SYS_TIMER(3_am33xx, gptimer); | ||
602 | #endif /* CONFIG_SOC_AM33XX */ | 592 | #endif /* CONFIG_SOC_AM33XX */ |
603 | 593 | ||
604 | #ifdef CONFIG_ARCH_OMAP4 | 594 | #ifdef CONFIG_ARCH_OMAP4 |
@@ -606,7 +596,7 @@ OMAP_SYS_32K_TIMER_INIT(4, 1, OMAP4_32K_SOURCE, "ti,timer-alwon", | |||
606 | 2, OMAP4_MPU_SOURCE); | 596 | 2, OMAP4_MPU_SOURCE); |
607 | #ifdef CONFIG_LOCAL_TIMERS | 597 | #ifdef CONFIG_LOCAL_TIMERS |
608 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29); | 598 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29); |
609 | static void __init omap4_local_timer_init(void) | 599 | void __init omap4_local_timer_init(void) |
610 | { | 600 | { |
611 | omap4_sync32k_timer_init(); | 601 | omap4_sync32k_timer_init(); |
612 | /* Local timers are not supprted on OMAP4430 ES1.0 */ | 602 | /* Local timers are not supprted on OMAP4430 ES1.0 */ |
@@ -624,18 +614,17 @@ static void __init omap4_local_timer_init(void) | |||
624 | } | 614 | } |
625 | } | 615 | } |
626 | #else /* CONFIG_LOCAL_TIMERS */ | 616 | #else /* CONFIG_LOCAL_TIMERS */ |
627 | static void __init omap4_local_timer_init(void) | 617 | void __init omap4_local_timer_init(void) |
628 | { | 618 | { |
629 | omap4_sync32k_timer_init(); | 619 | omap4_sync32k_timer_init(); |
630 | } | 620 | } |
631 | #endif /* CONFIG_LOCAL_TIMERS */ | 621 | #endif /* CONFIG_LOCAL_TIMERS */ |
632 | OMAP_SYS_TIMER(4, local); | ||
633 | #endif /* CONFIG_ARCH_OMAP4 */ | 622 | #endif /* CONFIG_ARCH_OMAP4 */ |
634 | 623 | ||
635 | #ifdef CONFIG_SOC_OMAP5 | 624 | #ifdef CONFIG_SOC_OMAP5 |
636 | OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon", | 625 | OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon", |
637 | 2, OMAP4_MPU_SOURCE); | 626 | 2, OMAP4_MPU_SOURCE); |
638 | static void __init omap5_realtime_timer_init(void) | 627 | void __init omap5_realtime_timer_init(void) |
639 | { | 628 | { |
640 | int err; | 629 | int err; |
641 | 630 | ||
@@ -646,7 +635,6 @@ static void __init omap5_realtime_timer_init(void) | |||
646 | if (err) | 635 | if (err) |
647 | pr_err("%s: arch_timer_register failed %d\n", __func__, err); | 636 | pr_err("%s: arch_timer_register failed %d\n", __func__, err); |
648 | } | 637 | } |
649 | OMAP_SYS_TIMER(5, realtime); | ||
650 | #endif /* CONFIG_SOC_OMAP5 */ | 638 | #endif /* CONFIG_SOC_OMAP5 */ |
651 | 639 | ||
652 | /** | 640 | /** |