linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] drivers: cpuidle: add status property to ARM idle states
@ 2014-10-16 13:59 Lorenzo Pieralisi
  2014-10-16 13:59 ` [PATCH 2/3] drivers: cpuidle: add idle-state-name description " Lorenzo Pieralisi
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Lorenzo Pieralisi @ 2014-10-16 13:59 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
 Documentation/devicetree/bindings/arm/idle-states.txt | 14 ++++++++++++++
 drivers/cpuidle/dt_idle_states.c                      |  3 +++
 2 files changed, 17 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/idle-states.txt b/Documentation/devicetree/bindings/arm/idle-states.txt
index 37375c7..d8ab4b9 100644
--- a/Documentation/devicetree/bindings/arm/idle-states.txt
+++ b/Documentation/devicetree/bindings/arm/idle-states.txt
@@ -317,6 +317,20 @@ follows:
 			    In such systems entry-latency-us + exit-latency-us
 			    will exceed wakeup-latency-us by this duration.
 
+	- status:
+		Usage: Optional
+		Value type: <string>
+		Definition: A standard device tree property [5] that indicates
+			    the operational status of an idle-state.
+			    If present, it shall be:
+			    "okay": to indicate that the idle state is
+				    operational.
+			    "disabled": to indicate that the idle state has
+					been disabled in firmware so it is not
+					operational.
+			    If property is not present the idle-state must be
+			    considered operational.
+
 	In addition to the properties listed above, a state node may require
 	additional properties specifics to the entry-method defined in the
 	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 52f4d11..22840f4 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,
 		if (!state_node)
 			break;
 
+		if (!of_device_is_available(state_node))
+			continue;
+
 		if (!idle_state_valid(state_node, i, cpumask)) {
 			pr_warn("%s idle state not valid, bailing out\n",
 				state_node->full_name);
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [GIT PULL] cpuidle: A few improvements for ARM cpuidle via DT
@ 2014-11-19 10:16 Daniel Lezcano
  2014-11-19 10:17 ` [PATCH 1/3] drivers: cpuidle: Add status property to ARM idle states Daniel Lezcano
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Lezcano @ 2014-11-19 10:16 UTC (permalink / raw)
  To: linux-arm-kernel


Hi Rafael,

this pull request, based on 3.18-rc5, contains a set of changes from 
Lorenzo Pieralisi.

  * Added a 'status' definition flag in the DT to specify the 
unsupported firmware idle states and ignore those states in the parsing 
code when initializing the cpuidle driver

  * Added an idle state description in the DT. As the idle states are 
not standardized on ARM, the description gives information about the 
idle state

  * Removed duplicate error message in the arm64 cpuidle drivers

Thanks !

   -- Daniel


The following changes since commit fc14f9c1272f62c3e8d01300f52467c0d9af50f9:

   Linux 3.18-rc5 (2014-11-16 16:36:20 -0800)

are available in the git repository at:

   http://git.linaro.org/git-ro/people/daniel.lezcano/linux.git cpuidle/3.19

for you to fetch changes up to 18f95a3640dbf421ab9532e517070a0c1cd4d582:

   drivers: cpuidle: Remove cpuidle-arm64 duplicate error messages 
(2014-11-19 10:16:28 +0100)

----------------------------------------------------------------
Lorenzo Pieralisi (3):
       drivers: cpuidle: Add status property to ARM idle states
       drivers: cpuidle: Add idle-state-name description to ARM idle states
       drivers: cpuidle: Remove cpuidle-arm64 duplicate error messages

  Documentation/devicetree/bindings/arm/idle-states.txt | 20 
++++++++++++++++++++
  drivers/cpuidle/cpuidle-arm64.c                       | 13 ++-----------
  drivers/cpuidle/dt_idle_states.c                      | 10 +++++++++-
  3 files changed, 31 insertions(+), 12 deletions(-)

-- 
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-11-19 10:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-16 13:59 [PATCH 1/3] drivers: cpuidle: add status property to ARM idle states Lorenzo Pieralisi
2014-10-16 13:59 ` [PATCH 2/3] drivers: cpuidle: add idle-state-name description " Lorenzo Pieralisi
2014-10-16 13:59 ` [PATCH 3/3] drivers: cpuidle: remove cpuidle-arm64 duplicate error messages Lorenzo Pieralisi
2014-10-20 21:38 ` [PATCH 1/3] drivers: cpuidle: add status property to ARM idle states Kevin Hilman
2014-10-21 16:20   ` Lorenzo Pieralisi
2014-11-10  7:45     ` Daniel Lezcano
2014-11-10 12:48       ` Lorenzo Pieralisi
2014-11-19 10:16 [GIT PULL] cpuidle: A few improvements for ARM cpuidle via DT Daniel Lezcano
2014-11-19 10:17 ` [PATCH 1/3] drivers: cpuidle: Add status property to ARM idle states Daniel Lezcano
2014-11-19 10:17   ` [PATCH 3/3] drivers: cpuidle: Remove cpuidle-arm64 duplicate error messages Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).