From: David Gibson <david@gibson.dropbear.id.au>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Stefan Roese <sr@denx.de>
Subject: Re: [PATCH] [POWERPC] 4xx: Add aliases node to 4xx dts files
Date: Mon, 17 Dec 2007 11:00:20 +1100 [thread overview]
Message-ID: <20071217000020.GA2394@localhost.localdomain> (raw)
In-Reply-To: <9618c94dbc228065db8bd99fbf6b7ba6@kernel.crashing.org>
On Sun, Dec 16, 2007 at 11:44:50PM +0100, Segher Boessenkool wrote:
> >> Hopefully some version that stores path strings in the properties
> >> in /aliases, and not phandles. Or does that current version of DTC
> >> do that correctly already, and just has an inconvenient source
> >> syntax?
> >
> > I don't think anyone's actually gone and generated phandles in
> > /aliases, although it was suggested early on. The syntax is
> > foo = < &bar >;
> > to generate a phandle and
> > foo = &bar;
> > to generate a path.
>
> Ah, I see.
>
> > I was a bit worried about confusion between these forms, but at least
> > Kumar and myself came up with this syntax independently, which
> > suggests it's not too surprising to most people, and no-one had any
> > other suggestions.
>
> I think I suggested it before, but anyway:
>
> how about you write
>
> aliases {
> foo = "/the/path/to/foo";
> };
>
> and then you can use &foo in the rest of the DTS to refer to the
> phandle (or path string, as it turns out :-) ) of the node? I.e.,
> use the aliases node to _generate_ aliases.
>
> Seems simpler than the current thing to me.
No. First, it's much nicer to have the label definition local to the
node it's labelling, rather than having to keep looking over at the
aliases node. Second, this syntax can only generate labels to nodes,
whereas the current syntax can label properties, their contents and
reserve entries as well. Third, we absolutely don't want to ditch the
current well-established and widely used syntax.
What I do want to add is a way of making aliases from labels without
having to explicitly fill in the aliases node. Perhaps something like
EMAC0[ethernet0]: ethernet@... { ... };
which would be equivalent to
EMAC0: ethernet@... { ... };
...
aliases { ethernet0 = &EMAC0; };
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2007-12-17 0:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-15 7:55 [PATCH] [POWERPC] 4xx: Add aliases node to 4xx dts files Stefan Roese
2007-12-16 6:19 ` David Gibson
2007-12-16 14:58 ` Josh Boyer
2007-12-16 18:10 ` Segher Boessenkool
2007-12-16 18:45 ` Josh Boyer
2007-12-16 22:33 ` David Gibson
2007-12-16 22:44 ` Segher Boessenkool
2007-12-17 0:00 ` David Gibson [this message]
2007-12-17 13:46 ` Jon Loeliger
2007-12-16 22:30 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071217000020.GA2394@localhost.localdomain \
--to=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=segher@kernel.crashing.org \
--cc=sr@denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).