On 11/30/2012 10:03 PM, Džiugas Baltrūnas wrote:
> Hello,
>
> We are using tens of BeagleBones running the same 3.2.30-psp23 kernel
> and all powered using a 5V/2A power adaptor. On almost one third of
> nodes system clock is ticking too fast, approximatelly 4 times faster
> (i.e. Fri Nov 30 16:15:19 UTC 2012 which is correct time versus Mon Dec
> 3 17:02:37 UTC 2012). We are also running ntpd on all nodes, but larger
> time difference causes it to panic and exit (-g flag helps, but only for
> a very short time).
>
> After some investigation I've noticed that some of the nodes boot with
> 32 KHz clock and some with 24MHz clock, but there is no rule that a
> particular clock is causing a time skew:
>
There is specific reason behind configuring them.
Timer 1 is used for system timers (clocksource) and we need it tobe
ticking across suspend/resume cycle, so we need persistent clock.
In case of AM335x, RTC 32k clock is the only clock available which is
persistent.
> --- node1.summary2012-11-09 10:40:01.660509296 +0100
> +++ node2.summary2012-11-09 10:42:02.932847298 +0100
You can try to change the timer1 parent and see if it fixes this issue.
To change the parent of the timer by,
Modify "arch/arm/mach-omap2/timer.c" with,
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 1af3871..91abfd3 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -420,7 +420,7 @@ OMAP_SYS_TIMER(3)
OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE,
2, OMAP3_MPU_SOURCE)
OMAP_SYS_TIMER(3_secure)
-OMAP_SYS_TIMER_INIT(3_am33xx, 2, OMAP4_MPU_SOURCE, 1, AM33XX_RTC32K_SOURCE)
+OMAP_SYS_TIMER_INIT(3_am33xx, 2, OMAP4_MPU_SOURCE, 1, OMAP4_MPU_SOURCE)
OMAP_SYS_TIMER(3_am33xx)
#endif
Thanks,
Vaibhav