]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
SH: shmobile: Consolidate time keeping and irq enable
authorRobert Lee <rob.lee@linaro.org>
Mon, 12 Mar 2012 22:24:41 +0000 (17:24 -0500)
committerRobert Lee <b18647@b18647-12.(none)>
Wed, 21 Mar 2012 04:39:43 +0000 (23:39 -0500)
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: Daniel Lezcano <daniel.lezcano@linaro.org>
arch/sh/kernel/cpu/shmobile/cpuidle.c

index 6d62eb40e750a2d8ad00919c0d75de477155875f..1ddc876d3b26a836a12b04197374afda66262afa 100644 (file)
@@ -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,19 +46,16 @@ 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;
 }
 
 static struct cpuidle_device cpuidle_dev;
 static struct cpuidle_driver cpuidle_driver = {
-       .name =         "sh_idle",
-       .owner =        THIS_MODULE,
+       .name                   = "sh_idle",
+       .owner                  = THIS_MODULE,
+       .en_core_tk_irqen       = 1,
 };
 
 void sh_mobile_setup_cpuidle(void)