timer.c (18060f3541cf020d63340bf4c1f9fb82427a7a2a) timer.c (f18153f984bef7ab551701f2bae74078c0ded27c)
1/*
2 * linux/arch/arm/mach-omap2/timer.c
3 *
4 * OMAP2 GP timer support.
5 *
6 * Copyright (C) 2009 Nokia Corporation
7 *
8 * Update to use new clocksource/clockevent layers

--- 580 unchanged lines hidden (view full) ---

589 2, "timer_sys_ck", NULL);
590#endif /* CONFIG_ARCH_OMAP3 */
591
592#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
593OMAP_SYS_GP_TIMER_INIT(3, 2, "timer_sys_ck", NULL,
594 1, "timer_sys_ck", "ti,timer-alwon");
595#endif
596
1/*
2 * linux/arch/arm/mach-omap2/timer.c
3 *
4 * OMAP2 GP timer support.
5 *
6 * Copyright (C) 2009 Nokia Corporation
7 *
8 * Update to use new clocksource/clockevent layers

--- 580 unchanged lines hidden (view full) ---

589 2, "timer_sys_ck", NULL);
590#endif /* CONFIG_ARCH_OMAP3 */
591
592#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
593OMAP_SYS_GP_TIMER_INIT(3, 2, "timer_sys_ck", NULL,
594 1, "timer_sys_ck", "ti,timer-alwon");
595#endif
596
597#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
597#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
598 defined(CONFIG_SOC_DRA7XX)
598static OMAP_SYS_32K_TIMER_INIT(4, 1, "timer_32k_ck", "ti,timer-alwon",
599 2, "sys_clkin_ck", NULL);
600#endif
601
602#ifdef CONFIG_ARCH_OMAP4
599static OMAP_SYS_32K_TIMER_INIT(4, 1, "timer_32k_ck", "ti,timer-alwon",
600 2, "sys_clkin_ck", NULL);
601#endif
602
603#ifdef CONFIG_ARCH_OMAP4
603#ifdef CONFIG_HAVE_ARM_TWD
604#ifdef CONFIG_LOCAL_TIMERS
604static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29);
605void __init omap4_local_timer_init(void)
606{
607 omap4_sync32k_timer_init();
608 /* Local timers are not supprted on OMAP4430 ES1.0 */
609 if (omap_rev() != OMAP4430_REV_ES1_0) {
610 int err;
611
612 if (of_have_populated_dt()) {
613 clocksource_of_init();
614 return;
615 }
616
617 err = twd_local_timer_register(&twd_local_timer);
618 if (err)
619 pr_err("twd_local_timer_register failed %d\n", err);
620 }
621}
605static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29);
606void __init omap4_local_timer_init(void)
607{
608 omap4_sync32k_timer_init();
609 /* Local timers are not supprted on OMAP4430 ES1.0 */
610 if (omap_rev() != OMAP4430_REV_ES1_0) {
611 int err;
612
613 if (of_have_populated_dt()) {
614 clocksource_of_init();
615 return;
616 }
617
618 err = twd_local_timer_register(&twd_local_timer);
619 if (err)
620 pr_err("twd_local_timer_register failed %d\n", err);
621 }
622}
622#else
623#else /* CONFIG_LOCAL_TIMERS */
623void __init omap4_local_timer_init(void)
624{
625 omap4_sync32k_timer_init();
626}
624void __init omap4_local_timer_init(void)
625{
626 omap4_sync32k_timer_init();
627}
627#endif /* CONFIG_HAVE_ARM_TWD */
628#endif /* CONFIG_LOCAL_TIMERS */
628#endif /* CONFIG_ARCH_OMAP4 */
629
630#ifdef CONFIG_SOC_OMAP5
631void __init omap5_realtime_timer_init(void)
632{
633 omap4_sync32k_timer_init();
634 realtime_counter_init();
635

--- 118 unchanged lines hidden ---
629#endif /* CONFIG_ARCH_OMAP4 */
630
631#ifdef CONFIG_SOC_OMAP5
632void __init omap5_realtime_timer_init(void)
633{
634 omap4_sync32k_timer_init();
635 realtime_counter_init();
636

--- 118 unchanged lines hidden ---