From patchwork Wed Feb 12 09:33:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 24524 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 130BB203F3 for ; Wed, 12 Feb 2014 09:34:00 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id tp5sf30448412ieb.11 for ; Wed, 12 Feb 2014 01:34:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=fmPycVNjYNxgrxURhbyK5bSwDPMbkON6heIWaPnKT/Q=; b=W/HyZJVze4P9pgpOY8mCML9kGlTxGlv39UQPNpGCJcP8P+lygJvqXmsG/RbSl5dule LnPY1SrutDwzYZlW09zaclZG8JWCapk9qy4Adfebr3DDNUW4WsrTGd7ogeJx95wIICxw Sw3RzYLu4Ek3AcAJdYEFTvGOo+JGtBZjiomBm3fIF4Ql5g/syb2JEe8p32rfx/JB8JrM YbKdupJi/i8GpBa0JzbdBFN7gyQN2y4QEFEY25iq4qUE6q/2K9a6SzQo1PjOl4nteqa9 BUxzIRZActywVCg3B/kWA2RpybgY8DSgAgYnRLTzsRCLewO7bSNoGh9AbFwAUvs5IWja 4TnA== X-Gm-Message-State: ALoCoQnhVoMjDhvYsjChkejTS7vZnd2YmjUGh05pZTKWnJgjN52GR3Kh0CfsA4v2tbkVHaSRQrnm X-Received: by 10.50.33.47 with SMTP id o15mr1299179igi.0.1392197640297; Wed, 12 Feb 2014 01:34:00 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.33.200 with SMTP id j66ls2819211qgj.80.gmail; Wed, 12 Feb 2014 01:34:00 -0800 (PST) X-Received: by 10.58.85.133 with SMTP id h5mr31888099vez.4.1392197640203; Wed, 12 Feb 2014 01:34:00 -0800 (PST) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id a8si7105298vej.55.2014.02.12.01.34.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 01:34:00 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id c14so7152353vea.31 for ; Wed, 12 Feb 2014 01:34:00 -0800 (PST) X-Received: by 10.58.211.130 with SMTP id nc2mr31242902vec.7.1392197640104; Wed, 12 Feb 2014 01:34:00 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp22662vcz; Wed, 12 Feb 2014 01:33:59 -0800 (PST) X-Received: by 10.66.248.227 with SMTP id yp3mr37614842pac.116.1392197638987; Wed, 12 Feb 2014 01:33:58 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sj5si22054386pab.255.2014.02.12.01.33.58; Wed, 12 Feb 2014 01:33:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751609AbaBLJd5 (ORCPT + 8 others); Wed, 12 Feb 2014 04:33:57 -0500 Received: from mail-oa0-f54.google.com ([209.85.219.54]:57695 "EHLO mail-oa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751999AbaBLJd4 (ORCPT ); Wed, 12 Feb 2014 04:33:56 -0500 Received: by mail-oa0-f54.google.com with SMTP id i4so10767157oah.27 for ; Wed, 12 Feb 2014 01:33:56 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.60.16.168 with SMTP id h8mr36572922oed.32.1392197636005; Wed, 12 Feb 2014 01:33:56 -0800 (PST) Received: by 10.60.70.38 with HTTP; Wed, 12 Feb 2014 01:33:55 -0800 (PST) In-Reply-To: <52E252FD.7030908@samsung.com> References: <1389084826-19827-1-git-send-email-tushar.behera@linaro.org> <52E15C27.3020104@samsung.com> <52E252FD.7030908@samsung.com> Date: Wed, 12 Feb 2014 15:03:55 +0530 Message-ID: Subject: Re: [PATCH] ARM: dts: Add l2x0 device node for Exynos4-based boards From: Tushar Behera To: Tomasz Figa Cc: linux-samsung-soc , Kgene Kim , Arnd Bergmann , Tomasz Figa Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On 24 January 2014 17:18, Tomasz Figa wrote: > > > On 24.01.2014 05:44, Tushar Behera wrote: >> >> On 23 January 2014 23:45, Tomasz Figa wrote: >>> >>> Hi, >>> >>> >>> On 07.01.2014 09:53, Tushar Behera wrote: >>>> >>>> >>>> For Exynos4 platform, L2 cache initialization is done only if >>>> a device node for l2x0 device exists. >>>> >>>> L2 cache initialization path is different when a board boots with >>>> secure firmware. Since there are many Exynos4 based SoCs that boot >>>> in secure mode, enabling this only for boards that don't boot with >>>> secure firmware. >>>> >>>> Signed-off-by: Tushar Behera >>>> --- >>>> >>>> Tested on Exynos4210-Origen board. >>>> >>>> arch/arm/boot/dts/exynos4.dtsi | 8 ++++++++ >>>> arch/arm/boot/dts/exynos4210-origen.dts | 4 ++++ >>>> arch/arm/boot/dts/exynos4210-smdkv310.dts | 4 ++++ >>>> arch/arm/boot/dts/exynos4210-trats.dts | 4 ++++ >>>> arch/arm/boot/dts/exynos4210-universal_c210.dts | 4 ++++ >>>> arch/arm/boot/dts/exynos4412-odroidx.dts | 4 ++++ >>>> arch/arm/boot/dts/exynos4412-smdk4412.dts | 4 ++++ >>>> arch/arm/boot/dts/exynos4412-tiny4412.dts | 4 ++++ >>>> 8 files changed, 36 insertions(+) >>> >>> >>> >>> Looks good. Unfortunately this is still going to break secure firmware >>> enabled boards, because l2x0_of_init() does not check if the node is >>> enabled. >>> >> >> Is the following check in l2x0_of_init() not enough? >> >> 1002 |-------np = of_find_matching_node(NULL, l2x0_ids); >> 1003 |-------if (!np) >> 1004 |-------|-------return -ENODEV; > > > It only looks for a matching node without checking its status property. > Hmm ... so in that case, will this work? diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 7abde2ce..ebcab01 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -973,11 +973,17 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask) struct device_node *np; const struct l2x0_of_data *data; struct resource res; + const char *status; np = of_find_matching_node(NULL, l2x0_ids); if (!np) return -ENODEV; + status = of_get_property(np, "status", NULL); + if (status) + if (strcmp(status, "okay")) + return -ENODEV; + if (of_address_to_resource(np, 0, &res)) return -ENODEV;