devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] ARM: mm: cache-l2x0: Check for status property of DT node
       [not found] ` <1392206478-11530-1-git-send-email-tushar.behera-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
@ 2014-02-12 12:42   ` Tomasz Figa
  2014-02-12 14:02     ` Mark Rutland
  0 siblings, 1 reply; 2+ messages in thread
From: Tomasz Figa @ 2014-02-12 12:42 UTC (permalink / raw)
  To: Tushar Behera, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ, Grant Likely,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring,
	Will Deacon

[making Cc list a bit more comprehensive]

On 12.02.2014 13:01, Tushar Behera wrote:
> Currently only the DT node is checked during l2x0 cache initialization,
> but it doesn't check the status of the DT node. Thus it gets called
> even if the status of DT node for L2 controller is disabled.
>
> Add explicit check to ensure that L2 cache is initialized only for
> desired boards.
>
> Reported-by: Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: Tushar Behera <tushar.behera-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>   arch/arm/mm/cache-l2x0.c |    3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
> index 7abde2c..f075cb1 100644
> --- a/arch/arm/mm/cache-l2x0.c
> +++ b/arch/arm/mm/cache-l2x0.c
> @@ -978,6 +978,9 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
>   	if (!np)
>   		return -ENODEV;
>
> +	if (!of_device_is_available(np))
> +		return -ENODEV;
> +
>   	if (of_address_to_resource(np, 0, &res))
>   		return -ENODEV;
>
>

Reviewed-by: Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

Best regards,
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] ARM: mm: cache-l2x0: Check for status property of DT node
  2014-02-12 12:42   ` [PATCH] ARM: mm: cache-l2x0: Check for status property of DT node Tomasz Figa
@ 2014-02-12 14:02     ` Mark Rutland
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Rutland @ 2014-02-12 14:02 UTC (permalink / raw)
  To: Tomasz Figa
  Cc: devicetree@vger.kernel.org, linux@arm.linux.org.uk, Will Deacon,
	Grant Likely, linux-arm-kernel@lists.infradead.org, Tushar Behera

On Wed, Feb 12, 2014 at 12:42:49PM +0000, Tomasz Figa wrote:
> [making Cc list a bit more comprehensive]
> 
> On 12.02.2014 13:01, Tushar Behera wrote:
> > Currently only the DT node is checked during l2x0 cache initialization,
> > but it doesn't check the status of the DT node. Thus it gets called
> > even if the status of DT node for L2 controller is disabled.
> >
> > Add explicit check to ensure that L2 cache is initialized only for
> > desired boards.
> >
> > Reported-by: Tomasz Figa <t.figa@samsung.com>
> > Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> > ---
> >   arch/arm/mm/cache-l2x0.c |    3 +++
> >   1 file changed, 3 insertions(+)
> >
> > diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
> > index 7abde2c..f075cb1 100644
> > --- a/arch/arm/mm/cache-l2x0.c
> > +++ b/arch/arm/mm/cache-l2x0.c
> > @@ -978,6 +978,9 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
> >   	if (!np)
> >   		return -ENODEV;
> >
> > +	if (!of_device_is_available(np))
> > +		return -ENODEV;
> > +
> >   	if (of_address_to_resource(np, 0, &res))
> >   		return -ENODEV;
> >
> >
> 
> Reviewed-by: Tomasz Figa <t.figa@samsung.com>

Looks sensible to me.

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

Thanks,
Mark.

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

end of thread, other threads:[~2014-02-12 14:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1392206478-11530-1-git-send-email-tushar.behera@linaro.org>
     [not found] ` <1392206478-11530-1-git-send-email-tushar.behera-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-02-12 12:42   ` [PATCH] ARM: mm: cache-l2x0: Check for status property of DT node Tomasz Figa
2014-02-12 14:02     ` Mark Rutland

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).