linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [POWERPC] 4xx: Add aliases node to 4xx dts files
@ 2007-12-15  7:55 Stefan Roese
  2007-12-16  6:19 ` David Gibson
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Roese @ 2007-12-15  7:55 UTC (permalink / raw)
  To: linuxppc-dev

Signed-off-by: Stefan Roese <sr@denx.de>
---
 arch/powerpc/boot/dts/bamboo.dts  |    9 +++++++++
 arch/powerpc/boot/dts/ebony.dts   |    7 +++++++
 arch/powerpc/boot/dts/ep405.dts   |    6 ++++++
 arch/powerpc/boot/dts/katmai.dts  |    7 +++++++
 arch/powerpc/boot/dts/kilauea.dts |    7 +++++++
 arch/powerpc/boot/dts/rainier.dts |   11 ++++++++++-
 arch/powerpc/boot/dts/sequoia.dts |    9 +++++++++
 arch/powerpc/boot/dts/taishan.dts |    7 +++++++
 arch/powerpc/boot/dts/walnut.dts  |    6 ++++++
 9 files changed, 68 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/boot/dts/bamboo.dts b/arch/powerpc/boot/dts/bamboo.dts
index 3652aec..2ebb437 100644
--- a/arch/powerpc/boot/dts/bamboo.dts
+++ b/arch/powerpc/boot/dts/bamboo.dts
@@ -18,6 +18,15 @@
 	compatible = "amcc,bamboo";
 	dcr-parent = <&/cpus/cpu@0>;
 
+	aliases {
+		ethernet0 = &EMAC0;
+		ethernet1 = &EMAC1;
+		serial0 = &UART0;
+		serial1 = &UART1;
+		serial2 = &UART2;
+		serial3 = &UART3;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
diff --git a/arch/powerpc/boot/dts/ebony.dts b/arch/powerpc/boot/dts/ebony.dts
index 3cb2849..f8790c4 100644
--- a/arch/powerpc/boot/dts/ebony.dts
+++ b/arch/powerpc/boot/dts/ebony.dts
@@ -18,6 +18,13 @@
 	compatible = "ibm,ebony";
 	dcr-parent = <&/cpus/cpu@0>;
 
+	aliases {
+		ethernet0 = &EMAC0;
+		ethernet1 = &EMAC1;
+		serial0 = &UART0;
+		serial1 = &UART1;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
diff --git a/arch/powerpc/boot/dts/ep405.dts b/arch/powerpc/boot/dts/ep405.dts
index 16cfc0d..9293855 100644
--- a/arch/powerpc/boot/dts/ep405.dts
+++ b/arch/powerpc/boot/dts/ep405.dts
@@ -16,6 +16,12 @@
 	compatible = "ep405";
 	dcr-parent = <&/cpus/cpu@0>;
 
+	aliases {
+		ethernet0 = &EMAC;
+		serial0 = &UART0;
+		serial1 = &UART1;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
diff --git a/arch/powerpc/boot/dts/katmai.dts b/arch/powerpc/boot/dts/katmai.dts
index 824cf4e..350e70e 100644
--- a/arch/powerpc/boot/dts/katmai.dts
+++ b/arch/powerpc/boot/dts/katmai.dts
@@ -19,6 +19,13 @@
 	compatible = "amcc,katmai";
 	dcr-parent = <&/cpus/cpu@0>;
 
+	aliases {
+		ethernet0 = &EMAC0;
+		serial0 = &UART0;
+		serial1 = &UART1;
+		serial2 = &UART2;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
diff --git a/arch/powerpc/boot/dts/kilauea.dts b/arch/powerpc/boot/dts/kilauea.dts
index 0a3fbfa..3814199 100644
--- a/arch/powerpc/boot/dts/kilauea.dts
+++ b/arch/powerpc/boot/dts/kilauea.dts
@@ -15,6 +15,13 @@
 	compatible = "amcc,kilauea";
 	dcr-parent = <&/cpus/cpu@0>;
 
+	aliases {
+		ethernet0 = &EMAC0;
+		ethernet1 = &EMAC1;
+		serial0 = &UART0;
+		serial1 = &UART1;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
diff --git a/arch/powerpc/boot/dts/rainier.dts b/arch/powerpc/boot/dts/rainier.dts
index 63d996e..b2e8231 100644
--- a/arch/powerpc/boot/dts/rainier.dts
+++ b/arch/powerpc/boot/dts/rainier.dts
@@ -19,6 +19,15 @@
 	compatible = "amcc,rainier";
 	dcr-parent = <&/cpus/cpu@0>;
 
+	aliases {
+		ethernet0 = &EMAC0;
+		ethernet1 = &EMAC1;
+		serial0 = &UART0;
+		serial1 = &UART1;
+		serial2 = &UART2;
+		serial3 = &UART3;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -93,7 +102,7 @@
 		#size-cells = <1>;
 		ranges;
 		clock-frequency = <0>; /* Filled in by zImage */
-		
+
 		SDRAM0: sdram {
 			compatible = "ibm,sdram-440grx", "ibm,sdram-44x-ddr2denali";
 			dcr-reg = <010 2>;
diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/sequoia.dts
index dbb1b3b..fb88028 100644
--- a/arch/powerpc/boot/dts/sequoia.dts
+++ b/arch/powerpc/boot/dts/sequoia.dts
@@ -19,6 +19,15 @@
 	compatible = "amcc,sequoia";
 	dcr-parent = <&/cpus/cpu@0>;
 
+	aliases {
+		ethernet0 = &EMAC0;
+		ethernet1 = &EMAC1;
+		serial0 = &UART0;
+		serial1 = &UART1;
+		serial2 = &UART2;
+		serial3 = &UART3;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
diff --git a/arch/powerpc/boot/dts/taishan.dts b/arch/powerpc/boot/dts/taishan.dts
index 0dec702..0706a4a 100644
--- a/arch/powerpc/boot/dts/taishan.dts
+++ b/arch/powerpc/boot/dts/taishan.dts
@@ -17,6 +17,13 @@
 	compatible = "amcc,taishan";
 	dcr-parent = <&/cpus/cpu@0>;
 
+	aliases {
+		ethernet0 = &EMAC2;
+		ethernet1 = &EMAC3;
+		serial0 = &UART0;
+		serial1 = &UART1;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
diff --git a/arch/powerpc/boot/dts/walnut.dts b/arch/powerpc/boot/dts/walnut.dts
index 8fcf6aa..0e3825e 100644
--- a/arch/powerpc/boot/dts/walnut.dts
+++ b/arch/powerpc/boot/dts/walnut.dts
@@ -16,6 +16,12 @@
 	compatible = "ibm,walnut";
 	dcr-parent = <&/cpus/cpu@0>;
 
+	aliases {
+		ethernet0 = &EMAC;
+		serial0 = &UART0;
+		serial1 = &UART1;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
-- 
1.5.3.7.949.g2221a6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] [POWERPC] 4xx: Add aliases node to 4xx dts files
  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
  0 siblings, 1 reply; 10+ messages in thread
From: David Gibson @ 2007-12-16  6:19 UTC (permalink / raw)
  To: Stefan Roese; +Cc: linuxppc-dev

On Sat, Dec 15, 2007 at 08:55:16AM +0100, Stefan Roese wrote:
> Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: David Gibson <david@gibson.dropbear.id.au>

-- 
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] [POWERPC] 4xx: Add aliases node to 4xx dts files
  2007-12-16  6:19 ` David Gibson
@ 2007-12-16 14:58   ` Josh Boyer
  2007-12-16 18:10     ` Segher Boessenkool
  2007-12-16 22:30     ` David Gibson
  0 siblings, 2 replies; 10+ messages in thread
From: Josh Boyer @ 2007-12-16 14:58 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev, Stefan Roese

On Sun, 16 Dec 2007 17:19:59 +1100
David Gibson <david@gibson.dropbear.id.au> wrote:

> On Sat, Dec 15, 2007 at 08:55:16AM +0100, Stefan Roese wrote:
> > Signed-off-by: Stefan Roese <sr@denx.de>
> Acked-by: David Gibson <david@gibson.dropbear.id.au>

Applied to my candidates tree.  Though I'd really like dtc to be merged
so that we can figure out what the in-kernel version will support.

josh

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] [POWERPC] 4xx: Add aliases node to 4xx dts files
  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:30     ` David Gibson
  1 sibling, 2 replies; 10+ messages in thread
From: Segher Boessenkool @ 2007-12-16 18:10 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev, Stefan Roese, David Gibson

> Applied to my candidates tree.  Though I'd really like dtc to be merged
> so that we can figure out what the in-kernel version will support.

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?


Segher

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] [POWERPC] 4xx: Add aliases node to 4xx dts files
  2007-12-16 18:10     ` Segher Boessenkool
@ 2007-12-16 18:45       ` Josh Boyer
  2007-12-16 22:33       ` David Gibson
  1 sibling, 0 replies; 10+ messages in thread
From: Josh Boyer @ 2007-12-16 18:45 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev, Stefan Roese, paulus, David Gibson

On Sun, 16 Dec 2007 19:10:02 +0100
Segher Boessenkool <segher@kernel.crashing.org> wrote:

> > Applied to my candidates tree.  Though I'd really like dtc to be merged
> > so that we can figure out what the in-kernel version will support.
> 
> 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 have no idea.  I can't even keep track of whether various DTC
features are dts-v1 only or not, and which "version" of DTC supports
which features.  That's why I'm sort of waiting for Paul to merge
whatever version of DTC he is going to merge.  *HINT*

We should also probably make a clear cut DTC release Real Soon Now.
*HINT*

josh

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] [POWERPC] 4xx: Add aliases node to 4xx dts files
  2007-12-16 14:58   ` Josh Boyer
  2007-12-16 18:10     ` Segher Boessenkool
@ 2007-12-16 22:30     ` David Gibson
  1 sibling, 0 replies; 10+ messages in thread
From: David Gibson @ 2007-12-16 22:30 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev, Stefan Roese

On Sun, Dec 16, 2007 at 08:58:58AM -0600, Josh Boyer wrote:
> On Sun, 16 Dec 2007 17:19:59 +1100
> David Gibson <david@gibson.dropbear.id.au> wrote:
> 
> > On Sat, Dec 15, 2007 at 08:55:16AM +0100, Stefan Roese wrote:
> > > Signed-off-by: Stefan Roese <sr@denx.de>
> > Acked-by: David Gibson <david@gibson.dropbear.id.au>
> 
> Applied to my candidates tree.  Though I'd really like dtc to be merged
> so that we can figure out what the in-kernel version will support.

I know, I know.  I've been a little preoccupied lately and need to get
back to working out what to do with the merge patches.

-- 
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] [POWERPC] 4xx: Add aliases node to 4xx dts files
  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 13:46         ` Jon Loeliger
  1 sibling, 2 replies; 10+ messages in thread
From: David Gibson @ 2007-12-16 22:33 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev, Stefan Roese

On Sun, Dec 16, 2007 at 07:10:02PM +0100, Segher Boessenkool wrote:
> > Applied to my candidates tree.  Though I'd really like dtc to be merged
> > so that we can figure out what the in-kernel version will support.
> 
> 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.

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.

-- 
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] [POWERPC] 4xx: Add aliases node to 4xx dts files
  2007-12-16 22:33       ` David Gibson
@ 2007-12-16 22:44         ` Segher Boessenkool
  2007-12-17  0:00           ` David Gibson
  2007-12-17 13:46         ` Jon Loeliger
  1 sibling, 1 reply; 10+ messages in thread
From: Segher Boessenkool @ 2007-12-16 22:44 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev, Stefan Roese

>> 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.


Segher

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] [POWERPC] 4xx: Add aliases node to 4xx dts files
  2007-12-16 22:44         ` Segher Boessenkool
@ 2007-12-17  0:00           ` David Gibson
  0 siblings, 0 replies; 10+ messages in thread
From: David Gibson @ 2007-12-17  0:00 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev, Stefan Roese

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] [POWERPC] 4xx: Add aliases node to 4xx dts files
  2007-12-16 22:33       ` David Gibson
  2007-12-16 22:44         ` Segher Boessenkool
@ 2007-12-17 13:46         ` Jon Loeliger
  1 sibling, 0 replies; 10+ messages in thread
From: Jon Loeliger @ 2007-12-17 13:46 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev, Stefan Roese

So, like, the other day David Gibson mumbled:
> On Sun, Dec 16, 2007 at 07:10:02PM +0100, Segher Boessenkool wrote:
> > 
> > Hopefully some version that stores path strings in the properties
> > in /aliases, and not phandles.

Yes.

> > Or does that current version of DTC
> > do that correctly already, and just has an inconvenient source
> > syntax?

Feh.  If there is an "inconvenient source syntax", or any other
annoying irregularity, please, by all means, suggest improvements
and offer patches!

> 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.
> 
> 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.

To be a bit more complete, Kumar and I discussed this as well.

jdl

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-12-17 13:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-12-17 13:46         ` Jon Loeliger
2007-12-16 22:30     ` David Gibson

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).