drivers: psci: Allow PSCI node to be disabled

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.

Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Acked-by: Mark Rutland <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
This commit is contained in:
Thierry Reding 2016-11-08 17:55:47 +00:00 • committed by Arnd Bergmann
commit d09a0011ec

View file

@ -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;