aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/pm-sh7372.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2011-11-11 00:01:30 -0500
committerPaul Mundt <lethal@linux-sh.org>2011-11-11 02:49:28 -0500
commitb73b5c493ac001870bd9faf565a61908c82f52d8 (patch)
treee3f370c108793f726d3a9b6118baf4979d63f08d /arch/arm/mach-shmobile/pm-sh7372.c
parent9b49139b34a66907662e0be8efe79316dc63f8e0 (diff)
ARM: mach-shmobile: cpuidle single/global and last_state fixes
The following commits break cpuidle on SH-Mobile ARM: 46bcfad cpuidle: Single/Global registration of idle states e978aa7 cpuidle: Move dev->last_residency update to driver enter routine; remove dev->last_state This patch remedies these issues by up-porting the SH-Mobile code to fit with the above introduced framework changes. It is worth noting that the new code becomes significantly cleaner, so these framework changes are very welcome. At the same time this breakage could probably have been avoided by grepping for "last_state" and "cpuidle_register_driver". Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/pm-sh7372.c')
-rw-r--r--arch/arm/mach-shmobile/pm-sh7372.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c
index 79612737c5b2..0a5b22942fd3 100644
--- a/arch/arm/mach-shmobile/pm-sh7372.c
+++ b/arch/arm/mach-shmobile/pm-sh7372.c
@@ -402,22 +402,18 @@ static void sh7372_setup_a3sm(unsigned long msk, unsigned long msk2)
402 402
403#ifdef CONFIG_CPU_IDLE 403#ifdef CONFIG_CPU_IDLE
404 404
405static void sh7372_cpuidle_setup(struct cpuidle_device *dev) 405static void sh7372_cpuidle_setup(struct cpuidle_driver *drv)
406{ 406{
407 struct cpuidle_state *state; 407 struct cpuidle_state *state = &drv->states[drv->state_count];
408 int i = dev->state_count;
409 408
410 state = &dev->states[i];
411 snprintf(state->name, CPUIDLE_NAME_LEN, "C2"); 409 snprintf(state->name, CPUIDLE_NAME_LEN, "C2");
412 strncpy(state->desc, "Core Standby Mode", CPUIDLE_DESC_LEN); 410 strncpy(state->desc, "Core Standby Mode", CPUIDLE_DESC_LEN);
413 state->exit_latency = 10; 411 state->exit_latency = 10;
414 state->target_residency = 20 + 10; 412 state->target_residency = 20 + 10;
415 state->power_usage = 1; /* perhaps not */ 413 state->flags = CPUIDLE_FLAG_TIME_VALID;
416 state->flags = 0; 414 shmobile_cpuidle_modes[drv->state_count] = sh7372_enter_core_standby;
417 state->flags |= CPUIDLE_FLAG_TIME_VALID;
418 shmobile_cpuidle_modes[i] = sh7372_enter_core_standby;
419 415
420 dev->state_count = i + 1; 416 drv->state_count++;
421} 417}
422 418
423static void sh7372_cpuidle_init(void) 419static void sh7372_cpuidle_init(void)