From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.191]) by ozlabs.org (Postfix) with ESMTP id 16C51DDE41 for ; Sun, 4 Nov 2007 14:29:49 +1100 (EST) Received: by rv-out-0910.google.com with SMTP id c27so1002876rvf for ; Sat, 03 Nov 2007 20:29:48 -0700 (PDT) Message-ID: Date: Sat, 3 Nov 2007 21:29:48 -0600 From: "Grant Likely" Sender: glikely@secretlab.ca To: "Kumar Gala" Subject: Re: [U-Boot-Users] use of aliases in device trees In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 References: Cc: linux-ppc list , David Gibson , U-Boot Users List List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 11/3/07, Kumar Gala wrote: > In some discussion on the u-boot dev list it became clear that having > aliases in the device tree might be useful as a common way to deal > with finding specific nodes that need fixing up by the firmware. > This problem also exists in the kernel bootwrappers. > > The common example is how to associate a given MAC address with the > proper ethernet node. In u-boot an explicit path is hard coded into > the u-boot build for each ethernet device. In the bootwrapper we use > "linux,network-index = " in the given ethernet node. > > One common solution would be having a top level aliases like the pmac > tree's have: > > aliases { > enet0 = "..."; > enet1 = "..."; > pci0 = "..."; > pci1 = "..."; > }; One question to ask is do we use full paths or phandles to point at nodes? OF, of course, uses full paths, but that does require more memory and processing power, but it might not be significant enough to worry about. If we use phandles, then we should use names that don't conflict with full path alias names. It would also be desirable to be able to generate a phandle alias from the full path alias in order to maintain some level of compatibility with OF. It also think it will make maintaining aliases in .dts files simpler because trivial changes to node paths won't break the phandle alias. Maybe something like: aliases { enet0,phandle = <&enet0>; enet1,phandle = <&enet1>; ... }; Cheers, g. > > I wanted to see what people think of this idea and about trying to > use common names for the aliases? If nothing else I believe we will > look at doing this on the FSL boards/parts. > > - k > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > U-Boot-Users mailing list > U-Boot-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/u-boot-users > -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. grant.likely@secretlab.ca (403) 399-0195