Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

SH: shmobile: Consolidate time keeping and irq enable

Enable core cpuidle timekeeping and irq enabling and remove that
handling from this code.

Signed-off-by: Robert Lee <rob.lee@linaro.org>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by

Robert Lee and committed by
Len Brown
5c48c873 ee807dd8

+3 -7
+3 -7
arch/sh/kernel/cpu/shmobile/cpuidle.c
··· 29 29 int index) 30 30 { 31 31 unsigned long allowed_mode = SUSP_SH_SLEEP; 32 - ktime_t before, after; 33 32 int requested_state = index; 34 33 int allowed_state; 35 34 int k; ··· 46 47 */ 47 48 k = min_t(int, allowed_state, requested_state); 48 49 49 - before = ktime_get(); 50 50 sh_mobile_call_standby(cpuidle_mode[k]); 51 - after = ktime_get(); 52 - 53 - dev->last_residency = (int)ktime_to_ns(ktime_sub(after, before)) >> 10; 54 51 55 52 return k; 56 53 } 57 54 58 55 static struct cpuidle_device cpuidle_dev; 59 56 static struct cpuidle_driver cpuidle_driver = { 60 - .name = "sh_idle", 61 - .owner = THIS_MODULE, 57 + .name = "sh_idle", 58 + .owner = THIS_MODULE, 59 + .en_core_tk_irqen = 1, 62 60 }; 63 61 64 62 void sh_mobile_setup_cpuidle(void)