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 3e2ffdbce220..57b1ee39fe56 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -549,7 +549,7 @@ static inline void __init realtime_counter_init(void) | |||
549 | 549 | ||
550 | #define OMAP_SYS_GP_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ | 550 | #define OMAP_SYS_GP_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ |
551 | clksrc_nr, clksrc_src) \ | 551 | clksrc_nr, clksrc_src) \ |
552 | static void __init omap##name##_gptimer_timer_init(void) \ | 552 | void __init omap##name##_gptimer_timer_init(void) \ |
553 | { \ | 553 | { \ |
554 | omap_dmtimer_init(); \ | 554 | omap_dmtimer_init(); \ |
555 | omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ | 555 | omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ |
@@ -558,7 +558,7 @@ static void __init omap##name##_gptimer_timer_init(void) \ | |||
558 | 558 | ||
559 | #define OMAP_SYS_32K_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ | 559 | #define OMAP_SYS_32K_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ |
560 | clksrc_nr, clksrc_src) \ | 560 | clksrc_nr, clksrc_src) \ |
561 | static void __init omap##name##_sync32k_timer_init(void) \ | 561 | void __init omap##name##_sync32k_timer_init(void) \ |
562 | { \ | 562 | { \ |
563 | omap_dmtimer_init(); \ | 563 | omap_dmtimer_init(); \ |
564 | omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ | 564 | omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ |
@@ -569,33 +569,23 @@ static void __init omap##name##_sync32k_timer_init(void) \ | |||
569 | omap2_sync32k_clocksource_init(); \ | 569 | omap2_sync32k_clocksource_init(); \ |
570 | } | 570 | } |
571 | 571 | ||
572 | #define OMAP_SYS_TIMER(name, clksrc) \ | ||
573 | struct sys_timer omap##name##_timer = { \ | ||
574 | .init = omap##name##_##clksrc##_timer_init, \ | ||
575 | }; | ||
576 | |||
577 | #ifdef CONFIG_ARCH_OMAP2 | 572 | #ifdef CONFIG_ARCH_OMAP2 |
578 | OMAP_SYS_32K_TIMER_INIT(2, 1, OMAP2_32K_SOURCE, "ti,timer-alwon", | 573 | OMAP_SYS_32K_TIMER_INIT(2, 1, OMAP2_32K_SOURCE, "ti,timer-alwon", |
579 | 2, OMAP2_MPU_SOURCE); | 574 | 2, OMAP2_MPU_SOURCE); |
580 | OMAP_SYS_TIMER(2, sync32k); | ||
581 | #endif /* CONFIG_ARCH_OMAP2 */ | 575 | #endif /* CONFIG_ARCH_OMAP2 */ |
582 | 576 | ||
583 | #ifdef CONFIG_ARCH_OMAP3 | 577 | #ifdef CONFIG_ARCH_OMAP3 |
584 | OMAP_SYS_32K_TIMER_INIT(3, 1, OMAP3_32K_SOURCE, "ti,timer-alwon", | 578 | OMAP_SYS_32K_TIMER_INIT(3, 1, OMAP3_32K_SOURCE, "ti,timer-alwon", |
585 | 2, OMAP3_MPU_SOURCE); | 579 | 2, OMAP3_MPU_SOURCE); |
586 | OMAP_SYS_TIMER(3, sync32k); | ||
587 | OMAP_SYS_32K_TIMER_INIT(3_secure, 12, OMAP3_32K_SOURCE, "ti,timer-secure", | 580 | OMAP_SYS_32K_TIMER_INIT(3_secure, 12, OMAP3_32K_SOURCE, "ti,timer-secure", |
588 | 2, OMAP3_MPU_SOURCE); | 581 | 2, OMAP3_MPU_SOURCE); |
589 | OMAP_SYS_TIMER(3_secure, sync32k); | ||
590 | OMAP_SYS_GP_TIMER_INIT(3_gp, 1, OMAP3_MPU_SOURCE, "ti,timer-alwon", | 582 | OMAP_SYS_GP_TIMER_INIT(3_gp, 1, OMAP3_MPU_SOURCE, "ti,timer-alwon", |
591 | 2, OMAP3_MPU_SOURCE); | 583 | 2, OMAP3_MPU_SOURCE); |
592 | OMAP_SYS_TIMER(3_gp, gptimer); | ||
593 | #endif /* CONFIG_ARCH_OMAP3 */ | 584 | #endif /* CONFIG_ARCH_OMAP3 */ |
594 | 585 | ||
595 | #ifdef CONFIG_SOC_AM33XX | 586 | #ifdef CONFIG_SOC_AM33XX |
596 | OMAP_SYS_GP_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon", | 587 | OMAP_SYS_GP_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon", |
597 | 2, OMAP4_MPU_SOURCE); | 588 | 2, OMAP4_MPU_SOURCE); |
598 | OMAP_SYS_TIMER(3_am33xx, gptimer); | ||
599 | #endif /* CONFIG_SOC_AM33XX */ | 589 | #endif /* CONFIG_SOC_AM33XX */ |
600 | 590 | ||
601 | #ifdef CONFIG_ARCH_OMAP4 | 591 | #ifdef CONFIG_ARCH_OMAP4 |
@@ -603,7 +593,7 @@ OMAP_SYS_32K_TIMER_INIT(4, 1, OMAP4_32K_SOURCE, "ti,timer-alwon", | |||
603 | 2, OMAP4_MPU_SOURCE); | 593 | 2, OMAP4_MPU_SOURCE); |
604 | #ifdef CONFIG_LOCAL_TIMERS | 594 | #ifdef CONFIG_LOCAL_TIMERS |
605 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29); | 595 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29); |
606 | static void __init omap4_local_timer_init(void) | 596 | void __init omap4_local_timer_init(void) |
607 | { | 597 | { |
608 | omap4_sync32k_timer_init(); | 598 | omap4_sync32k_timer_init(); |
609 | /* Local timers are not supprted on OMAP4430 ES1.0 */ | 599 | /* Local timers are not supprted on OMAP4430 ES1.0 */ |
@@ -621,18 +611,17 @@ static void __init omap4_local_timer_init(void) | |||
621 | } | 611 | } |
622 | } | 612 | } |
623 | #else /* CONFIG_LOCAL_TIMERS */ | 613 | #else /* CONFIG_LOCAL_TIMERS */ |
624 | static void __init omap4_local_timer_init(void) | 614 | void __init omap4_local_timer_init(void) |
625 | { | 615 | { |
626 | omap4_sync32k_timer_init(); | 616 | omap4_sync32k_timer_init(); |
627 | } | 617 | } |
628 | #endif /* CONFIG_LOCAL_TIMERS */ | 618 | #endif /* CONFIG_LOCAL_TIMERS */ |
629 | OMAP_SYS_TIMER(4, local); | ||
630 | #endif /* CONFIG_ARCH_OMAP4 */ | 619 | #endif /* CONFIG_ARCH_OMAP4 */ |
631 | 620 | ||
632 | #ifdef CONFIG_SOC_OMAP5 | 621 | #ifdef CONFIG_SOC_OMAP5 |
633 | OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon", | 622 | OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon", |
634 | 2, OMAP4_MPU_SOURCE); | 623 | 2, OMAP4_MPU_SOURCE); |
635 | static void __init omap5_realtime_timer_init(void) | 624 | void __init omap5_realtime_timer_init(void) |
636 | { | 625 | { |
637 | int err; | 626 | int err; |
638 | 627 | ||
@@ -643,7 +632,6 @@ static void __init omap5_realtime_timer_init(void) | |||
643 | if (err) | 632 | if (err) |
644 | pr_err("%s: arch_timer_register failed %d\n", __func__, err); | 633 | pr_err("%s: arch_timer_register failed %d\n", __func__, err); |
645 | } | 634 | } |
646 | OMAP_SYS_TIMER(5, realtime); | ||
647 | #endif /* CONFIG_SOC_OMAP5 */ | 635 | #endif /* CONFIG_SOC_OMAP5 */ |
648 | 636 | ||
649 | /** | 637 | /** |