All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: psci: Allow PSCI node to be disabled
@ 2015-08-07 13:56 Thierry Reding
  0 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2015-08-07 13:56 UTC (permalink / raw)
  To: linux-arm-kernel

From: Thierry Reding <treding@nvidia.com>

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 <treding@nvidia.com>
---
 drivers/firmware/psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index a6956007dd38..59e66ac2c3b6 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -351,7 +351,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;
-- 
2.4.5

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

* [PATCH] drivers: psci: Allow PSCI node to be disabled
  2016-10-20 12:39 ` Mark Rutland
@ 2016-10-20 12:58   ` Lorenzo Pieralisi
  0 siblings, 0 replies; 4+ messages in thread
From: Lorenzo Pieralisi @ 2016-10-20 12:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Oct 20, 2016 at 01:39:07PM +0100, Mark Rutland wrote:
> On Mon, Oct 17, 2016 at 12:46:53PM +0200, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> > 
> > 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 <treding@nvidia.com>
> 
> This looks sensible to me; FWIW:
> 
> Acked-by: Mark Rutland <mark.rutland@arm.com>
> 
> 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

> Thanks,
> Mark.
> 
> > ---
> >  drivers/firmware/psci.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
> > index 8263429e21b8..6c60a5087caf 100644
> > --- a/drivers/firmware/psci.c
> > +++ b/drivers/firmware/psci.c
> > @@ -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;
> > -- 
> > 2.10.0
> > 
> 

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

* [PATCH] drivers: psci: Allow PSCI node to be disabled
  2016-10-17 10:46 Thierry Reding
@ 2016-10-20 12:39 ` Mark Rutland
  2016-10-20 12:58   ` Lorenzo Pieralisi
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Rutland @ 2016-10-20 12:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 17, 2016 at 12:46:53PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> 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 <treding@nvidia.com>

This looks sensible to me; FWIW:

Acked-by: Mark Rutland <mark.rutland@arm.com>

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

Thanks,
Mark.

> ---
>  drivers/firmware/psci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
> index 8263429e21b8..6c60a5087caf 100644
> --- a/drivers/firmware/psci.c
> +++ b/drivers/firmware/psci.c
> @@ -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;
> -- 
> 2.10.0
> 

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

* [PATCH] drivers: psci: Allow PSCI node to be disabled
@ 2016-10-17 10:46 Thierry Reding
  2016-10-20 12:39 ` Mark Rutland
  0 siblings, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2016-10-17 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

From: Thierry Reding <treding@nvidia.com>

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 <treding@nvidia.com>
---
 drivers/firmware/psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 8263429e21b8..6c60a5087caf 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -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;
-- 
2.10.0

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

end of thread, other threads:[~2016-10-20 12:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07 13:56 [PATCH] drivers: psci: Allow PSCI node to be disabled Thierry Reding
2016-10-17 10:46 Thierry Reding
2016-10-20 12:39 ` Mark Rutland
2016-10-20 12:58   ` Lorenzo Pieralisi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.