]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/sh/kernel/cpu/shmobile/cpuidle.c
sh: SuperH Mobile Software Standby support for cpuidle
[mv-sheeva.git] / arch / sh / kernel / cpu / shmobile / cpuidle.c
index 4afdd975cc664698375b4a9a74ce8ab0304a1a53..1c504bd972c305fba8684f99c53fd443ecd74c16 100644 (file)
@@ -21,6 +21,7 @@
 static unsigned long cpuidle_mode[] = {
        SUSP_SH_SLEEP, /* regular sleep mode */
        SUSP_SH_SLEEP | SUSP_SH_SF, /* sleep mode + self refresh */
+       SUSP_SH_STANDBY | SUSP_SH_SF, /* software standby mode + self refresh */
 };
 
 static int cpuidle_sleep_enter(struct cpuidle_device *dev,
@@ -96,6 +97,16 @@ void sh_mobile_setup_cpuidle(void)
        state->flags |= CPUIDLE_FLAG_TIME_VALID;
        state->enter = cpuidle_sleep_enter;
 
+       state = &dev->states[i++];
+       snprintf(state->name, CPUIDLE_NAME_LEN, "C2");
+       strncpy(state->desc, "SuperH Mobile Standby Mode [SF]", CPUIDLE_DESC_LEN);
+       state->exit_latency = 2300;
+       state->target_residency = 1 * 2;
+       state->power_usage = 1;
+       state->flags = 0;
+       state->flags |= CPUIDLE_FLAG_TIME_VALID;
+       state->enter = cpuidle_sleep_enter;
+
        dev->state_count = i;
 
        cpuidle_register_device(dev);