aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2014-02-07 05:21:26 -0500
committerTony Lindgren <tony@atomide.com>2014-02-28 18:33:27 -0500
commit5b5c01359152f3ddaa1aa0e5d1141bc2b29ba2c5 (patch)
treee6683590742e986101f18d21a3a9dbed1043a9ad
parent7a2e05132424ea6bd5d957941ee9805774bad32f (diff)
ARM: OMAP2+: AM43x: Use gptimer as clocksource
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>
-rw-r--r--arch/arm/mach-omap2/board-generic.c2
-rw-r--r--arch/arm/mach-omap2/timer.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 8e3daa11602b..5679464a2f88 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -229,7 +229,7 @@ DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)")
229 .init_late = am43xx_init_late, 229 .init_late = am43xx_init_late,
230 .init_irq = omap_gic_of_init, 230 .init_irq = omap_gic_of_init,
231 .init_machine = omap_generic_init, 231 .init_machine = omap_generic_init,
232 .init_time = omap3_sync32k_timer_init, 232 .init_time = omap3_gptimer_timer_init,
233 .dt_compat = am43_boards_compat, 233 .dt_compat = am43_boards_compat,
234MACHINE_END 234MACHINE_END
235#endif 235#endif
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 74044aaf438b..b62de9f9d05c 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -604,7 +604,8 @@ OMAP_SYS_32K_TIMER_INIT(3_secure, 12, "secure_32k_fck", "ti,timer-secure",
604 2, "timer_sys_ck", NULL); 604 2, "timer_sys_ck", NULL);
605#endif /* CONFIG_ARCH_OMAP3 */ 605#endif /* CONFIG_ARCH_OMAP3 */
606 606
607#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX) 607#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX) || \
608 defined(CONFIG_SOC_AM43XX)
608OMAP_SYS_GP_TIMER_INIT(3, 2, "timer_sys_ck", NULL, 609OMAP_SYS_GP_TIMER_INIT(3, 2, "timer_sys_ck", NULL,
609 1, "timer_sys_ck", "ti,timer-alwon"); 610 1, "timer_sys_ck", "ti,timer-alwon");
610#endif 611#endif