diff options
author | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2014-10-15 11:50:52 -0400 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2014-11-19 04:16:15 -0500 |
commit | 97735da074fdd3fe39d975cad8760807df0d4388 (patch) | |
tree | c54a15ea6798d01078f838eef35a946cc939b215 | |
parent | fc14f9c1272f62c3e8d01300f52467c0d9af50f9 (diff) |
drivers: cpuidle: Add status property to ARM idle states
On some platforms the device tree bindings must provide the kernel
with a status flag for idle states, that defines whether the idle
state is operational or not in the current configuration.
This patch adds a status property to the ARM idle states compliant
with ePAPR v1.1 and updates the DT parsing code accordingly.
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r-- | Documentation/devicetree/bindings/arm/idle-states.txt | 14 | ||||
-rw-r--r-- | drivers/cpuidle/dt_idle_states.c | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/arm/idle-states.txt b/Documentation/devicetree/bindings/arm/idle-states.txt index 37375c7f3ccc..5e5151130c20 100644 --- a/Documentation/devicetree/bindings/arm/idle-states.txt +++ b/Documentation/devicetree/bindings/arm/idle-states.txt | |||
@@ -317,6 +317,20 @@ follows: | |||
317 | In such systems entry-latency-us + exit-latency-us | 317 | In such systems entry-latency-us + exit-latency-us |
318 | will exceed wakeup-latency-us by this duration. | 318 | will exceed wakeup-latency-us by this duration. |
319 | 319 | ||
320 | - status: | ||
321 | Usage: Optional | ||
322 | Value type: <string> | ||
323 | Definition: A standard device tree property [5] that indicates | ||
324 | the operational status of an idle-state. | ||
325 | If present, it shall be: | ||
326 | "okay": to indicate that the idle state is | ||
327 | operational. | ||
328 | "disabled": to indicate that the idle state has | ||
329 | been disabled in firmware so it is not | ||
330 | operational. | ||
331 | If the property is not present the idle-state must | ||
332 | be considered operational. | ||
333 | |||
320 | In addition to the properties listed above, a state node may require | 334 | In addition to the properties listed above, a state node may require |
321 | additional properties specifics to the entry-method defined in the | 335 | additional properties specifics to the entry-method defined in the |
322 | idle-states node, please refer to the entry-method bindings | 336 | idle-states node, please refer to the entry-method bindings |
diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c index 52f4d11bbf3f..22840f40283c 100644 --- a/drivers/cpuidle/dt_idle_states.c +++ b/drivers/cpuidle/dt_idle_states.c | |||
@@ -169,6 +169,9 @@ int dt_init_idle_driver(struct cpuidle_driver *drv, | |||
169 | if (!state_node) | 169 | if (!state_node) |
170 | break; | 170 | break; |
171 | 171 | ||
172 | if (!of_device_is_available(state_node)) | ||
173 | continue; | ||
174 | |||
172 | if (!idle_state_valid(state_node, i, cpumask)) { | 175 | if (!idle_state_valid(state_node, i, cpumask)) { |
173 | pr_warn("%s idle state not valid, bailing out\n", | 176 | pr_warn("%s idle state not valid, bailing out\n", |
174 | state_node->full_name); | 177 | state_node->full_name); |