From patchwork Thu Apr 17 17:42:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 28587 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AD6172013D for ; Thu, 17 Apr 2014 17:43:24 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id x10sf2298907pdj.10 for ; Thu, 17 Apr 2014 10:43:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=tLkaJKpkvZ9i0quWV9YMNI3WXmAQwU9tQRkj8/+OHZA=; b=EmaUZuJfcbkaoy3s6vQinuD8qQOgESroy8wP7U3VXZvZHYMOjyNSbhKAhi6Xq9mGCu +9wv9EV+v4W9MZB914tDfy+XzVLi+CxamCKW6OK+ZKh+rqTRE92A3Z/js5ifGaWiJMxu eOKDQ0N0k3qj1wNV3ZEuoVars6JuhgrRlrMVVwuEekjo6y+WMmXr+NVcTR2RvvNVaDCV EP69VcaZHARvdLbjjo/wMVgnAdkJ967EQbMXQmnJghWA1KgT9r99fFbmy3XEU6lBw+94 cW+x0nkN0KIj48o8x1VIebCpSOksC8sqN1b346JP8LVnQF6IEpNGknDWfw1Q4tg5MGnd dF7g== X-Gm-Message-State: ALoCoQllDHkPRL8Iml1ikV7ka+awWOMhv8IEkc378LSSic7XQAbGazNRsZ8qbFCN9fVeZYMOPHh/ X-Received: by 10.66.189.163 with SMTP id gj3mr7826398pac.32.1397756603961; Thu, 17 Apr 2014 10:43:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.20.138 with SMTP id 10ls1105611qgj.92.gmail; Thu, 17 Apr 2014 10:43:23 -0700 (PDT) X-Received: by 10.52.69.146 with SMTP id e18mr7946870vdu.15.1397756603817; Thu, 17 Apr 2014 10:43:23 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id sn5si4558153vdc.173.2014.04.17.10.43.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Apr 2014 10:43:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id im17so879739vcb.9 for ; Thu, 17 Apr 2014 10:43:23 -0700 (PDT) X-Received: by 10.220.105.4 with SMTP id r4mr2931338vco.27.1397756603742; Thu, 17 Apr 2014 10:43:23 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp53469vcb; Thu, 17 Apr 2014 10:43:23 -0700 (PDT) X-Received: by 10.194.186.140 with SMTP id fk12mr3541371wjc.47.1397756602949; Thu, 17 Apr 2014 10:43:22 -0700 (PDT) Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by mx.google.com with ESMTPS id d5si9256684wjf.84.2014.04.17.10.43.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Apr 2014 10:43:22 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.51 is neither permitted nor denied by best guess record for domain of leif.lindholm@linaro.org) client-ip=74.125.82.51; Received: by mail-wg0-f51.google.com with SMTP id k14so743159wgh.22 for ; Thu, 17 Apr 2014 10:43:22 -0700 (PDT) X-Received: by 10.194.24.74 with SMTP id s10mr12936364wjf.43.1397756602524; Thu, 17 Apr 2014 10:43:22 -0700 (PDT) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginm.net. [86.14.224.72]) by mx.google.com with ESMTPSA id lh6sm39895218wjb.27.2014.04.17.10.43.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Apr 2014 10:43:21 -0700 (PDT) From: Leif Lindholm To: linux-kernel@vger.kernel.org Cc: patches@linaro.org, Leif Lindholm , linuxppc-dev@lists.ozlabs.org, Grant Likely , Mark Rutland , devicetree@vger.kernel.org Subject: [PATCH 3/3] of: Handle memory@0 node on PPC32 only Date: Thu, 17 Apr 2014 18:42:01 +0100 Message-Id: <1397756521-29387-4-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1397756521-29387-1-git-send-email-leif.lindholm@linaro.org> References: <1397756521-29387-1-git-send-email-leif.lindholm@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In order to deal with an firmware bug on a specific ppc32 platform (longtrail), early_init_dt_scan_memory() looks for a node called memory@0 on all platforms. Restrict this quirk to ppc32 kernels only. Signed-off-by: Leif Lindholm Cc: linuxppc-dev@lists.ozlabs.org Cc: Grant Likely Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/of/fdt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index fa16a91..7368472 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -887,14 +887,19 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname, /* We are scanning "memory" nodes only */ if (type == NULL) { +#ifdef CONFIG_PPC32 /* * The longtrail doesn't have a device_type on the * /memory node, so look for the node called /memory@0. */ if (depth != 1 || strcmp(uname, "memory@0") != 0) return 0; - } else if (strcmp(type, "memory") != 0) +#else + return 0; +#endif + } else if (strcmp(type, "memory") != 0) { return 0; + } reg = of_get_flat_dt_prop(node, "linux,usable-memory", &l); if (reg == NULL)