ARM: OMAP2+: AM43x: Use gptimer as clocksource
authorRajendra Nayak <rnayak@ti.com>
Fri, 7 Feb 2014 10:21:26 +0000 (15:51 +0530)
committerTony Lindgren <tony@atomide.com>
Fri, 28 Feb 2014 23:33:27 +0000 (15:33 -0800)
The SyncTimer in AM43x is clocked using the following two sources:
1) An inaccuarte 32k clock (CLK_32KHZ) derived from PER DPLL, causing system
   time to go slowly (~10% deviation).
2) external 32KHz RTC clock, which may not always be available on board like
   in the case of ePOS EVM

Use gptimer as clocksource instead, as is done in the case of AM335x
(which does not have a SyncTimer). With this, system time keeping works
accurately.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/timer.c

index 8e3daa11602b305473b63ded02749cf152c6f415..5679464a2f8806465ff2f7044216f43f87e907c7 100644 (file)
@@ -229,7 +229,7 @@ DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)")
        .init_late      = am43xx_init_late,
        .init_irq       = omap_gic_of_init,
        .init_machine   = omap_generic_init,
-       .init_time      = omap3_sync32k_timer_init,
+       .init_time      = omap3_gptimer_timer_init,
        .dt_compat      = am43_boards_compat,
 MACHINE_END
 #endif
index 74044aaf438b6f2c5fa9c093d40e15077b06f153..b62de9f9d05c1efa2bc8a88683fbcf24c25fe9db 100644 (file)
@@ -604,7 +604,8 @@ OMAP_SYS_32K_TIMER_INIT(3_secure, 12, "secure_32k_fck", "ti,timer-secure",
                        2, "timer_sys_ck", NULL);
 #endif /* CONFIG_ARCH_OMAP3 */
 
-#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
+#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX) || \
+       defined(CONFIG_SOC_AM43XX)
 OMAP_SYS_GP_TIMER_INIT(3, 2, "timer_sys_ck", NULL,
                       1, "timer_sys_ck", "ti,timer-alwon");
 #endif