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>
This commit is contained in:
Robert Lee 2012-03-20 15:22:49 -05:00 коммит произвёл Len Brown
Родитель ee807dd89c
Коммит 5c48c873ba
1 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -29,7 +29,6 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev,
int index) int index)
{ {
unsigned long allowed_mode = SUSP_SH_SLEEP; unsigned long allowed_mode = SUSP_SH_SLEEP;
ktime_t before, after;
int requested_state = index; int requested_state = index;
int allowed_state; int allowed_state;
int k; int k;
@ -47,19 +46,16 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev,
*/ */
k = min_t(int, allowed_state, requested_state); k = min_t(int, allowed_state, requested_state);
before = ktime_get();
sh_mobile_call_standby(cpuidle_mode[k]); sh_mobile_call_standby(cpuidle_mode[k]);
after = ktime_get();
dev->last_residency = (int)ktime_to_ns(ktime_sub(after, before)) >> 10;
return k; return k;
} }
static struct cpuidle_device cpuidle_dev; static struct cpuidle_device cpuidle_dev;
static struct cpuidle_driver cpuidle_driver = { static struct cpuidle_driver cpuidle_driver = {
.name = "sh_idle", .name = "sh_idle",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.en_core_tk_irqen = 1,
}; };
void sh_mobile_setup_cpuidle(void) void sh_mobile_setup_cpuidle(void)