diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-08-17 09:41:40 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-18 10:17:32 +0900 |
commit | 63cd91dfd4976cb9687b07e9a9864912631d2e08 (patch) | |
tree | 5748ee4a092e93c1cfcdaafb1044733954e1cd3a /arch/sh/kernel/cpu/shmobile/cpuidle.c | |
parent | 309214af53f030e0664aea011a9f628c5eb9cc2d (diff) | |
download | blackbird-op-linux-63cd91dfd4976cb9687b07e9a9864912631d2e08.tar.gz blackbird-op-linux-63cd91dfd4976cb9687b07e9a9864912631d2e08.zip |
sh: SuperH Mobile Software Standby support for cpuidle
This patch adds "SuperH Mobile Standby Mode [SF]" to the list
of cpuidle sleep modes. If the software latency requirements
from cpuidle are met together with fulfilled hardware
requirements then deep sleep modes can be entered.
Tested on sh7722 and sh7724 with "Sleep Mode", "Sleep Mode + SF"
and "Software Standby Mode + SF" together with a multimedia
work load and flood ping without packet drop.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/shmobile/cpuidle.c')
-rw-r--r-- | arch/sh/kernel/cpu/shmobile/cpuidle.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c index 4afdd975cc66..1c504bd972c3 100644 --- a/arch/sh/kernel/cpu/shmobile/cpuidle.c +++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c @@ -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); |