From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Sat, 02 Aug 2008 20:51:54 -0400 Subject: [U-Boot-Users] [PATCH] fdt: Add simple alias support to fdt print command In-Reply-To: References: <4874D673.1090606@ge.com> <4874EF29.3000102@ge.com> Message-ID: <4895012A.90907@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Kumar Gala wrote: > > On Jul 9, 2008, at 12:02 PM, Jerry Van Baren wrote: > >> >> Thinking out loud... we could define the syntax that a leading "*" >> indicates the first part of the path is a dereference of /aliases. >> >> Assuming >> /aliases/soc = /soc8360 at e000000 >> /aliases/ethernet0 = /soc8360 at e0000000/.../enet0 >> then >> print *soc/enet0 >> and >> print *ethernet0 >> would both work and print the right thing. You *would* have to know >> that the first element of the path is an /aliases dereference. Your >> original patch did not require that piece of knowledge (but silently >> and automagically, which makes me nervous). > > did we come to resolution on this? I'd like to see this in 1.3.5. > > - k Hi Kumar, I think we have basic resolution - I would like to see it in 1.3.5 too. I haven't pushed on this, waiting for 1.3.5 window to open (or some free time, whichever comes last). I've CC:ed David Gibson in case he has some advice - the concept is to indicate a dereference of /aliases nodes so that us lazy engineers don't have to cut'n'paste the whole long path from the alias. Kumar originally proposed to do it automagically and I countered proposing using "*" to indicate the next path name should be looked up in /aliases and the result used instead (i.e. dereferenced). Discussion thread: Looking at the ieee1275 doc it looks like "*" will work for a dereference delimiter as it is not listed as one of the permitted punctuation characters in a node name. Quoting 3.2.1.1 Node names: ---------------------------------------------------------------------- The driver name field is a sequence of between one and 31 letters, digits, and punctuation characters from the set ", . _ + - ". Uppercase and lowercase characters are distinct. ---------------------------------------------------------------------- We do have a problem with property names, where "*" _is_ a legal name component. Quoting 3.2.2.1.1 Property names: ---------------------------------------------------------------------- The property name is a human-readable text string consisting of one to thirty-one printable characters. Property names shall not contain uppercase characters or the characters "/", "\", ":", "[", "]" and "@". ---------------------------------------------------------------------- Note that "*" is not proscribed, making it a legal character in a property name. Having noted that, I'm willing to take the risk and use "*" for the "alias dereference" separator. Looking back at the original patch, Kumar's original patch only did the /aliases dereference for the "fdt print" command. I'm thinking more general purpose: being able to dereference /aliases in all "fdt" commands. This seems helpful for the "fdt set" command, for instance. Whether this is reasonable to implement remains to be seen... Best regards, gvb