From: Vaibhav Hiremath Date: Mon, 5 Mar 2012 05:23:00 +0000 (+0530) Subject: ARM: TIME: Enable sys_timer suspend/resume callback api's X-Git-Url: https://git.ti.com/gitweb?p=sitara-epos%2Fsitara-epos-kernel.git;a=commitdiff_plain;h=ae265fa78e8d242f2199505c68ebd10e355cbf43 ARM: TIME: Enable sys_timer suspend/resume callback api's In case of AM335x, we do not 32k_counter available, which is actually being used as source timer in OMAP family of devices. AM335x has 8 timer modules, 2 timer modules are in wakeup/always-on domain, and out of these 2, 1 timer is secure timer; which leaves SW to use only 1 timer which can run in off/suspend state. And we need 2 timers, one for clockevent and another for clocksource. The suspend/resume callbacks are available on sys_timer and clocksource, but due to unknown reason clocksource callbacks are not working. TODO: WE MUST DEBUG FURTHER ON THIS. The sys_timer suspend/resume callback api's are supressed under config option !defined(CONFIG_GENERIC_CLOCKEVENTS), enable it, required for AM335x suspend/resume funtionality. Not sure, why it is not enabled and appliable to ARM arch, will have to follow up it with community. Signed-off-by: Vaibhav Hiremath --- diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 8c57dd3680e9..3abe5da9962b 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -112,7 +112,7 @@ void timer_tick(void) } #endif -#if defined(CONFIG_PM) && !defined(CONFIG_GENERIC_CLOCKEVENTS) +#if defined(CONFIG_PM) static int timer_suspend(void) { if (system_timer->suspend)