[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1523531671-27491-17-git-send-email-ulf.hansson@linaro.org>
Date: Thu, 12 Apr 2018 13:14:21 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: "Rafael J . Wysocki" <rjw@...ysocki.net>,
Sudeep Holla <sudeep.holla@....com>,
Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
Mark Rutland <mark.rutland@....com>, linux-pm@...r.kernel.org
Cc: Kevin Hilman <khilman@...nel.org>,
Lina Iyer <ilina@...eaurora.org>,
Lina Iyer <lina.iyer@...aro.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Vincent Guittot <vincent.guittot@...aro.org>,
Stephen Boyd <sboyd@...nel.org>,
Juri Lelli <juri.lelli@....com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
linux-arm-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v7 16/26] drivers: firmware: psci: Support hierarchical CPU idle states
From: Lina Iyer <lina.iyer@...aro.org>
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 <ilina@...eaurora.org>
Suggested-by: Sudeep Holla <sudeep.holla@....com>
Signed-off-by: Lina Iyer <lina.iyer@...aro.org>
Co-developed-by: Ulf Hansson <ulf.hansson@...aro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@...aro.org>
---
drivers/firmware/psci/psci.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index 9788bfc..256b4ed 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/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
Powered by blists - more mailing lists