diff options
author | Robert Lee <rob.lee@linaro.org> | 2012-03-20 16:22:49 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-03-21 02:01:34 -0400 |
commit | 5c48c873baf1a67b93d26770c8fe4d41f26f48af (patch) | |
tree | 2fc79e2764ae239af947b03581234a89393cfe7d /arch | |
parent | ee807dd89c0003a5cc0ec961132cd83542e5c30c (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/kernel/cpu/shmobile/cpuidle.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c index 6d62eb40e750..1ddc876d3b26 100644 --- a/arch/sh/kernel/cpu/shmobile/cpuidle.c +++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c | |||
@@ -29,7 +29,6 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev, | |||
29 | int index) | 29 | int index) |
30 | { | 30 | { |
31 | unsigned long allowed_mode = SUSP_SH_SLEEP; | 31 | unsigned long allowed_mode = SUSP_SH_SLEEP; |
32 | ktime_t before, after; | ||
33 | int requested_state = index; | 32 | int requested_state = index; |
34 | int allowed_state; | 33 | int allowed_state; |
35 | int k; | 34 | int k; |
@@ -47,19 +46,16 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev, | |||
47 | */ | 46 | */ |
48 | k = min_t(int, allowed_state, requested_state); | 47 | k = min_t(int, allowed_state, requested_state); |
49 | 48 | ||
50 | before = ktime_get(); | ||
51 | sh_mobile_call_standby(cpuidle_mode[k]); | 49 | sh_mobile_call_standby(cpuidle_mode[k]); |
52 | after = ktime_get(); | ||
53 | |||
54 | dev->last_residency = (int)ktime_to_ns(ktime_sub(after, before)) >> 10; | ||
55 | 50 | ||
56 | return k; | 51 | return k; |
57 | } | 52 | } |
58 | 53 | ||
59 | static struct cpuidle_device cpuidle_dev; | 54 | static struct cpuidle_device cpuidle_dev; |
60 | static struct cpuidle_driver cpuidle_driver = { | 55 | static struct cpuidle_driver cpuidle_driver = { |
61 | .name = "sh_idle", | 56 | .name = "sh_idle", |
62 | .owner = THIS_MODULE, | 57 | .owner = THIS_MODULE, |
58 | .en_core_tk_irqen = 1, | ||
63 | }; | 59 | }; |
64 | 60 | ||
65 | void sh_mobile_setup_cpuidle(void) | 61 | void sh_mobile_setup_cpuidle(void) |