summaryrefslogtreecommitdiffstats
path: root/hw/slw.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-30 11:23:44 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-30 11:23:44 +1000
commitbfc00d15fe5ce1a878cadda2eeaa653efd8ec16f (patch)
tree78a597f8d416758150198cdce3d4d53a06d94d48 /hw/slw.c
parent0768e820ed612d455a18cbe4bf5ef9f0ff0d65e0 (diff)
downloadtalos-skiboot-bfc00d15fe5ce1a878cadda2eeaa653efd8ec16f.tar.gz
talos-skiboot-bfc00d15fe5ce1a878cadda2eeaa653efd8ec16f.zip
slw: Fix indication of whether sleep is supported
Don't enable it if HB doesn't allow it and fix backward logic in the code that was supposed to disable it. Also print out more diagnostic info. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'hw/slw.c')
-rw-r--r--hw/slw.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/hw/slw.c b/hw/slw.c
index bd8735cd..98be022d 100644
--- a/hw/slw.c
+++ b/hw/slw.c
@@ -548,18 +548,23 @@ void add_cpu_idle_state_properties(void)
const struct dt_property *p;
p = dt_find_property(dt_root, "ibm,enabled-idle-states");
-
+ if (p)
+ printf("SLW: HB-provided idle states property found\n");
states = power8_cpu_idle_states;
nr_states = ARRAY_SIZE(power8_cpu_idle_states);
/* Check if hostboot say we can sleep */
- if (p && !dt_prop_find_string(p, "fastsleep"))
- can_sleep = true;
+ if (!p || !dt_prop_find_string(p, "fastsleep")) {
+ printf("SLW: Sleep not enabled by HB on this platform\n");
+ can_sleep = false;
+ }
/* Clip to NAP only on Murano DD1.x */
if (chip->type == PROC_CHIP_P8_MURANO &&
- chip->ec_level < 0x20)
+ chip->ec_level < 0x20) {
+ printf("SLW: Sleep not enabled on Murano DD1.x\n");
can_sleep = false;
+ }
} else {
states = power7_cpu_idle_states;
OpenPOWER on IntegriCloud