Thread (40 messages) 40 messages, 4 authors, 2018-04-18
STALE2977d
Revisions (4)
  1. v6 current
  2. v7 [diff vs current]
  3. v8 [diff vs current]
  4. v10 [diff vs current]

[PATCH v6 14/25] drivers: firmware: psci: Support hierarchical CPU idle states

From: Ulf Hansson <hidden>
Date: 2018-03-14 17:03:09
Also in: linux-arm-msm, linux-pm, lkml
Subsystem: the rest · Maintainer: Linus Torvalds

From: Lina Iyer <redacted>

Currently CPU's idle states are represented in a flattened model, via the
"cpu-idle-states" binding from within the CPU's device nodes.

Support the hierarchical layout, simply by converting to calling the new OF
helper, of_get_cpu_state_node().

Cc: Lina Iyer <redacted>
Suggested-by: Sudeep Holla <redacted>
Signed-off-by: Lina Iyer <redacted>
Co-developed-by: Ulf Hansson <redacted>
Signed-off-by: Ulf Hansson <redacted>
---
 drivers/firmware/psci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 9788bfc..256b4ed 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -294,8 +294,7 @@ static int psci_dt_cpu_init_idle(struct device_node *cpu_node, int cpu)
 	struct device_node *state_node;
 
 	/* Count idle states */
-	while ((state_node = of_parse_phandle(cpu_node, "cpu-idle-states",
-					      count))) {
+	while ((state_node = of_get_cpu_state_node(cpu_node, count))) {
 		count++;
 		of_node_put(state_node);
 	}
@@ -308,7 +307,7 @@ static int psci_dt_cpu_init_idle(struct device_node *cpu_node, int cpu)
 		return -ENOMEM;
 
 	for (i = 0; i < count; i++) {
-		state_node = of_parse_phandle(cpu_node, "cpu-idle-states", i);
+		state_node = of_get_cpu_state_node(cpu_node, i);
 		ret = psci_dt_parse_state_node(state_node, &psci_states[i]);
 		of_node_put(state_node);
 
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help