[PATCH] Add aliases node to 8641hpcn DTS file.

David Gibson david at gibson.dropbear.id.au
Thu Dec 6 09:33:40 EST 2007


On Wed, Dec 05, 2007 at 03:28:16PM -0700, Mark A. Greer wrote:
> On Wed, Dec 05, 2007 at 11:32:50AM -0600, Jon Loeliger wrote:
> 
> > diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
> > index abb26dc..b039f21 100644
> > --- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
> > +++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
> > @@ -16,6 +16,17 @@
> >  	#address-cells = <1>;
> >  	#size-cells = <1>;
> >  
> > +	aliases {
> > +		ethernet0 = &enet0;
> > +		ethernet1 = &enet1;
> > +		ethernet2 = &enet2;
> > +		ethernet3 = &enet3;
> > +		serial0 = &serial0;
> > +		serial1 = &serial1;
> > +		pci0 = &pci0;
> > +		pci1 = &pci1;
> > +	};
> > +
> >  	cpus {
> >  		#address-cells = <1>;
> >  		#size-cells = <0>;
> > @@ -107,7 +118,7 @@
> >  			};
> >  		};
> >  
> > -		ethernet at 24000 {
> > +		enet0: ethernet at 24000 {
> >  			#address-cells = <1>;
> >  			#size-cells = <0>;
> >  			device_type = "network";
> 
> This is probably a dumb question but I'll ask it anyway.
> 
> What's the point of 'aliases' when you already have labels?
> E.g., why not just use enet0 instead of making an ethernet0 alias?

The aliase information is available in the output tree, whereas labels
are only internal to dtc (well, except for asm output).

I'm planning to add support later to automatically generate aliases
from specially marked labels.

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



More information about the Linuxppc-dev mailing list