From mboxrd@z Thu Jan 1 00:00:00 1970 From: t.figa@samsung.com (Tomasz Figa) Date: Wed, 12 Feb 2014 13:42:49 +0100 Subject: [PATCH] ARM: mm: cache-l2x0: Check for status property of DT node In-Reply-To: <1392206478-11530-1-git-send-email-tushar.behera@linaro.org> References: <1392206478-11530-1-git-send-email-tushar.behera@linaro.org> Message-ID: <52FB6C49.6010401@samsung.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org [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 > Signed-off-by: Tushar Behera > --- > 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 Best regards, Tomasz From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Figa Subject: Re: [PATCH] ARM: mm: cache-l2x0: Check for status property of DT node Date: Wed, 12 Feb 2014 13:42:49 +0100 Message-ID: <52FB6C49.6010401@samsung.com> References: <1392206478-11530-1-git-send-email-tushar.behera@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-reply-to: <1392206478-11530-1-git-send-email-tushar.behera-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Tushar Behera , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org, Grant Likely , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Rob Herring , Will Deacon List-Id: devicetree@vger.kernel.org [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 > Signed-off-by: Tushar Behera > --- > 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 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