summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/shmobile/cpuidle.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-11-24 16:32:11 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-11-24 16:32:11 +0900
commit49fb2cd2571e0134e5a12c5abab227696e4940c7 (patch)
tree9a77364e988ef3f3af24feee3f5bb91bd0c34129 /arch/sh/kernel/cpu/shmobile/cpuidle.c
parentdfc349402de8e95f6a42e8341e9ea193b718eee3 (diff)
parent260af56271f79da0e37faa5a99b1786b221297e5 (diff)
downloadtalos-op-linux-49fb2cd2571e0134e5a12c5abab227696e4940c7.tar.gz
talos-op-linux-49fb2cd2571e0134e5a12c5abab227696e4940c7.zip
Merge branch 'master' into sh/st-integration
Diffstat (limited to 'arch/sh/kernel/cpu/shmobile/cpuidle.c')
-rw-r--r--arch/sh/kernel/cpu/shmobile/cpuidle.c42
1 files changed, 24 insertions, 18 deletions
diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c
index 1c504bd972c3..83972aa319c2 100644
--- a/arch/sh/kernel/cpu/shmobile/cpuidle.c
+++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c
@@ -87,25 +87,31 @@ void sh_mobile_setup_cpuidle(void)
dev->safe_state = state;
- state = &dev->states[i++];
- snprintf(state->name, CPUIDLE_NAME_LEN, "C1");
- strncpy(state->desc, "SuperH Sleep Mode [SF]", CPUIDLE_DESC_LEN);
- state->exit_latency = 100;
- state->target_residency = 1 * 2;
- state->power_usage = 1;
- state->flags = 0;
- state->flags |= CPUIDLE_FLAG_TIME_VALID;
- state->enter = cpuidle_sleep_enter;
+ if (sh_mobile_sleep_supported & SUSP_SH_SF) {
+ state = &dev->states[i++];
+ snprintf(state->name, CPUIDLE_NAME_LEN, "C1");
+ strncpy(state->desc, "SuperH Sleep Mode [SF]",
+ CPUIDLE_DESC_LEN);
+ state->exit_latency = 100;
+ state->target_residency = 1 * 2;
+ state->power_usage = 1;
+ state->flags = 0;
+ 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;
+ if (sh_mobile_sleep_supported & SUSP_SH_STANDBY) {
+ 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;
OpenPOWER on IntegriCloud