diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-07-30 11:23:44 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-07-30 11:23:44 +1000 |
commit | bfc00d15fe5ce1a878cadda2eeaa653efd8ec16f (patch) | |
tree | 78a597f8d416758150198cdce3d4d53a06d94d48 /hw/slw.c | |
parent | 0768e820ed612d455a18cbe4bf5ef9f0ff0d65e0 (diff) | |
download | talos-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.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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; |