Skip to contentSkip to conversation

drivers: psci: Allow PSCI node to be disabled

PATCH New Thierry Reding 3 participants 3 messages Oct 17, 2016 – Oct 20, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: psci: Allow PSCI node to be disabled

From: Thierry Reding <[email protected]>

Allow disabling PSCI support (mostly for testing purposes) by setting the status property to "disabled". This makes the node behave in much the same way as proper device nodes.

---
 drivers/firmware/psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/psci.c +1 -1
index 8263429e21b8..6c60a5087caf 100644
@@ -630,7 +630,7 @@ int __init psci_dt_init(void)
 
 	np = of_find_matching_node_and_match(NULL, psci_of_match, &matched_np);
 
-	if (!np)
+	if (!np || !of_device_is_available(np))
 		return -ENODEV;
 
 	init_fn = (psci_initcall_t)matched_np->data;
Signature · 1 line
2.10.0
#1 lore raw

PATCH 1/1 drivers: psci: Allow PSCI node to be disabled

Quoted 7 lines · Thierry Reding

From: Thierry Reding <[email protected]>

Allow disabling PSCI support (mostly for testing purposes) by setting the status property to "disabled". This makes the node behave in much the same way as proper device nodes.

This looks sensible to me; FWIW:

Lorenzo, do we need to batch this up with other PSCI patches, or should this go direct to arm-soc?

Thanks,
Mark.

Quoted 20 lines
---
 drivers/firmware/psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/psci.c +1 -1
index 8263429e21b8..6c60a5087caf 100644
@@ -630,7 +630,7 @@ int __init psci_dt_init(void)
 
 	np = of_find_matching_node_and_match(NULL, psci_of_match, &matched_np);
 
-	if (!np)
+	if (!np || !of_device_is_available(np))
 		return -ENODEV;
 
 	init_fn = (psci_initcall_t)matched_np->data;
Signature · 1 line
2.10.0
#2 lore raw

PATCH 1/1 drivers: psci: Allow PSCI node to be disabled

Quoted 7 lines · Mark Rutland
Quoted 6 lines · Thierry Reding

From: Thierry Reding <[email protected]>

Allow disabling PSCI support (mostly for testing purposes) by setting the status property to "disabled". This makes the node behave in much the same way as proper device nodes.

Quoted 8 lines
Quoted 1 line

This looks sensible to me; FWIW:

Lorenzo, do we need to batch this up with other PSCI patches, or should this go direct to arm-soc?

I am aiming at getting the PSCI checker merged too so that we can send both patches (and others that may turn up) in one go to arm-soc, I will handle it.

Thanks !
Lorenzo

Quoted 24 lines

Thanks,
Mark.

Quoted 20 lines
---
 drivers/firmware/psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/psci.c +1 -1
index 8263429e21b8..6c60a5087caf 100644
@@ -630,7 +630,7 @@ int __init psci_dt_init(void)
 
 	np = of_find_matching_node_and_match(NULL, psci_of_match, &matched_np);
 
-	if (!np)
+	if (!np || !of_device_is_available(np))
 		return -ENODEV;
 
 	init_fn = (psci_initcall_t)matched_np->data;
Signature · 1 line
2.10.0