Commit 5c48c873 authored by Robert Lee's avatar Robert Lee Committed by Len Brown

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: default avatarRobert Lee <rob.lee@linaro.org>
Reviewed-by: default avatarKevin Hilman <khilman@ti.com>
Reviewed-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: default avatarJean Pihet <j-pihet@ti.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent ee807dd8
......@@ -29,7 +29,6 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev,
int index)
{
unsigned long allowed_mode = SUSP_SH_SLEEP;
ktime_t before, after;
int requested_state = index;
int allowed_state;
int k;
......@@ -47,11 +46,7 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev,
*/
k = min_t(int, allowed_state, requested_state);
before = ktime_get();
sh_mobile_call_standby(cpuidle_mode[k]);
after = ktime_get();
dev->last_residency = (int)ktime_to_ns(ktime_sub(after, before)) >> 10;
return k;
}
......@@ -60,6 +55,7 @@ static struct cpuidle_device cpuidle_dev;
static struct cpuidle_driver cpuidle_driver = {
.name = "sh_idle",
.owner = THIS_MODULE,
.en_core_tk_irqen = 1,
};
void sh_mobile_setup_cpuidle(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment