am335x: Enable RTC 32K OSC clock
authorVaibhav Hiremath <hvaibhav@ti.com>
Thu, 8 Mar 2012 11:45:47 +0000 (17:15 +0530)
committerkhasim <khasim@khasim-desktop.(none)>
Thu, 29 Mar 2012 13:21:44 +0000 (18:51 +0530)
commit67d3d4d8d9cbe02a5a358a3ce7ba6f256338899e
treec7cd3ceb84c9fbcdfec886a11c96aadd4da9c194
parent222cb6c3a4ee081eef70ec6c6e5644d765b04edd
am335x: Enable RTC 32K OSC clock

In order to support low power state, you must source kernel
system timers to persistent clock, available across suspend/resume.
In case of AM335x device, the only source we have is, RTC32K, available
in wakeup/always-on domain.
Having said that, during validation it has been observed that, RTC clock
need couple of seconds delay to stabilize the RTC OSC clock;
and such a huge delay is not acceptable in kernel especially during
early init and also it will impact quick/fast boot use-cases.

So, RTC32k OSC enable dependency has been shifted to SPL/first-bootloader.

In Kernel, in order to support older u-boot version/releases we have
adopted fallback mechanism; where, if timer goes into bad state OR
becomes idle, then we again switch back to main/default sys_ck_in (24MHz).

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
CC: Tom Rini <trini@ti.com>
arch/arm/include/asm/arch-ti81xx/cpu.h
arch/arm/include/asm/arch-ti81xx/hardware.h
board/ti/am335x/evm.c
board/ti/am335x/pll.c