From patchwork Mon Aug 15 06:36:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 3448 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 159EC23E54 for ; Mon, 15 Aug 2011 06:28:44 +0000 (UTC) Received: from mail-ew0-f52.google.com (mail-ew0-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id F17D1A18500 for ; Mon, 15 Aug 2011 06:28:43 +0000 (UTC) Received: by ewy28 with SMTP id 28so2500191ewy.11 for ; Sun, 14 Aug 2011 23:28:43 -0700 (PDT) Received: by 10.213.29.147 with SMTP id q19mr452142ebc.132.1313389723643; Sun, 14 Aug 2011 23:28:43 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.213.102.5 with SMTP id e5cs80763ebo; Sun, 14 Aug 2011 23:28:43 -0700 (PDT) Received: from mr.google.com ([10.227.32.65]) by 10.227.32.65 with SMTP id b1mr4353491wbd.79.1313389723313 (num_hops = 1); Sun, 14 Aug 2011 23:28:43 -0700 (PDT) Received: by 10.227.32.65 with SMTP id b1mr3151745wbd.79.1313389720823; Sun, 14 Aug 2011 23:28:40 -0700 (PDT) Received: from DB3EHSOBE001.bigfish.com (db3ehsobe001.messaging.microsoft.com [213.199.154.139]) by mx.google.com with ESMTPS id ey5si15027192wbb.93.2011.08.14.23.28.39 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 14 Aug 2011 23:28:39 -0700 (PDT) Received-SPF: neutral (google.com: 213.199.154.139 is neither permitted nor denied by best guess record for domain of r65073@freescale.com) client-ip=213.199.154.139; Authentication-Results: mx.google.com; spf=neutral (google.com: 213.199.154.139 is neither permitted nor denied by best guess record for domain of r65073@freescale.com) smtp.mail=r65073@freescale.com Received: from mail16-db3-R.bigfish.com (10.3.81.249) by DB3EHSOBE001.bigfish.com (10.3.84.21) with Microsoft SMTP Server id 14.1.225.22; Mon, 15 Aug 2011 06:28:39 +0000 Received: from mail16-db3 (localhost.localdomain [127.0.0.1]) by mail16-db3-R.bigfish.com (Postfix) with ESMTP id E673FED8129; Mon, 15 Aug 2011 06:28:38 +0000 (UTC) X-SpamScore: -14 X-BigFish: VS-14(zz1432N14e3M98dKzz1202hzz8275bhz2dh2a8h668h839h944h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail16-db3 (localhost.localdomain [127.0.0.1]) by mail16-db3 (MessageSwitch) id 1313389718853693_32254; Mon, 15 Aug 2011 06:28:38 +0000 (UTC) Received: from DB3EHSMHS017.bigfish.com (unknown [10.3.81.253]) by mail16-db3.bigfish.com (Postfix) with ESMTP id C9307C8804E; Mon, 15 Aug 2011 06:28:38 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB3EHSMHS017.bigfish.com (10.3.87.117) with Microsoft SMTP Server (TLS) id 14.1.225.22; Mon, 15 Aug 2011 06:28:38 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.323.2; Mon, 15 Aug 2011 01:28:36 -0500 Received: from S2100-06.ap.freescale.net (S2100-06.ap.freescale.net [10.192.242.125]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p7F6SXHT012960; Mon, 15 Aug 2011 01:28:34 -0500 (CDT) Date: Mon, 15 Aug 2011 14:36:44 +0800 From: Shawn Guo To: David Miller CC: , , , Subject: Re: [PATCH] dt: add of_alias_scan and of_alias_get_id Message-ID: <20110815063643.GI7244@S2100-06.ap.freescale.net> References: <1313371817-5135-1-git-send-email-shawn.guo@linaro.org> <20110814.224341.2228974983062837890.davem@davemloft.net> <20110815060708.GH7244@S2100-06.ap.freescale.net> <20110814.230529.611834234177280886.davem@davemloft.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110814.230529.611834234177280886.davem@davemloft.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: freescale.com On Sun, Aug 14, 2011 at 11:05:29PM -0700, David Miller wrote: > From: Shawn Guo > Date: Mon, 15 Aug 2011 14:07:09 +0800 > > > Can you please help me a little bit more with the "other places"? > > arch/sparc/kernel/prom*.c > How about the following changes? I do not even have a compiler to do build test for sparc. Is it possible for me to get one from somewhere? ---8<----- diff --git a/drivers/of/pdt.c b/drivers/of/pdt.c index 4d87b5d..124280a 100644 --- a/drivers/of/pdt.c +++ b/drivers/of/pdt.c @@ -245,4 +245,11 @@ void __init of_pdt_build_devicetree(phandle root_node, struct of_pdt_ops *ops) nextp = &allnodes->allnext; allnodes->child = of_pdt_build_tree(allnodes, of_pdt_prom_ops->getchild(allnodes->phandle), &nextp); + + /* Get pointer to "/chosen" and "/aliasas" nodes for use everywhere */ + of_chosen = of_find_node_by_path("/chosen"); + if (of_chosen == NULL) + of_chosen = of_find_node_by_path("/chosen@0"); + of_aliases = of_find_node_by_path("/aliases"); + of_alias_scan(dt_alloc); }