Add aliases node to 8641hpcn DTS file.
Subsystems (2)
PATCH 1/1 Add aliases node to 8641hpcn DTS file.
The addition of the aliases node is needed for U-Boot and, eventually, cuImage, to help locate the proper nodes reliably when using the libfdt approach.
--- arch/powerpc/boot/dts/mpc8641_hpcn.dts | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-)
arch/powerpc/boot/dts/mpc8641_hpcn.dts +20 -8
@@ -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@24000 { + enet0: ethernet@24000 { #address-cells = <1>; #size-cells = <0>; device_type = "network";
@@ -127,7 +138,7 @@ phy-connection-type = "rgmii-id"; }; - ethernet@25000 { + enet1: ethernet@25000 { #address-cells = <1>; #size-cells = <0>; device_type = "network";
@@ -147,7 +158,7 @@ phy-connection-type = "rgmii-id"; }; - ethernet@26000 { + enet2: ethernet@26000 { #address-cells = <1>; #size-cells = <0>; device_type = "network";
@@ -167,7 +178,7 @@ phy-connection-type = "rgmii-id"; }; - ethernet@27000 { + enet3: ethernet@27000 { #address-cells = <1>; #size-cells = <0>; device_type = "network";
@@ -186,7 +197,8 @@ phy-handle = <&phy3>; phy-connection-type = "rgmii-id"; }; - serial@4500 { + + serial0: serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>;
@@ -195,7 +207,7 @@ interrupt-parent = <&mpic>; }; - serial@4600 { + serial1: serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>;
@@ -222,7 +234,7 @@ }; }; - pcie@f8008000 { + pci0: pcie@f8008000 { compatible = "fsl,mpc8641-pcie"; device_type = "pci"; #interrupt-cells = <1>;
@@ -430,7 +442,7 @@ }; - pcie@f8009000 { + pci1: pcie@f8009000 { compatible = "fsl,mpc8641-pcie"; device_type = "pci"; #interrupt-cells = <1>;
Signature · 1 line
1.5.2.1.126.g6abd0
Quoted 18 lines · Jon Loeliger
The addition of the aliases node is needed for U-Boot and, eventually, cuImage, to help locate the proper nodes reliably when using the libfdt approach.
Signed-off-by Jon Loeliger <[email protected]>--- arch/powerpc/boot/dts/mpc8641_hpcn.dts | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-)arch/powerpc/boot/dts/mpc8641_hpcn.dts +0
-0@@ -16,6 +16,17 @@ #address-cells = <1>; #size-cells = <1>;
arch/powerpc/boot/dts/mpc8641_hpcn.dts line 28
Quoted 10 lines
arch/powerpc/boot/dts/mpc8641_hpcn.dts +10
-0+ aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + ethernet2 = &enet2; + ethernet3 = &enet3; + serial0 = &serial0; + serial1 = &serial1; + pci0 = &pci0; + pci1 = &pci1; + };
I had thought aliases were supposed to be full paths to nodes instead of phandles. Was I wrong?
Quoted 87 lines
arch/powerpc/boot/dts/mpc8641_hpcn.dts +10
-9+ cpus { #address-cells = <1>; #size-cells = <0>;@@ -107,7 +118,7 @@ }; }; - ethernet@24000 { + enet0: ethernet@24000 { #address-cells = <1>; #size-cells = <0>; device_type = "network";@@ -127,7 +138,7 @@ phy-connection-type = "rgmii-id"; }; - ethernet@25000 { + enet1: ethernet@25000 { #address-cells = <1>; #size-cells = <0>; device_type = "network";@@ -147,7 +158,7 @@ phy-connection-type = "rgmii-id"; }; - ethernet@26000 { + enet2: ethernet@26000 { #address-cells = <1>; #size-cells = <0>; device_type = "network";@@ -167,7 +178,7 @@ phy-connection-type = "rgmii-id"; }; - ethernet@27000 { + enet3: ethernet@27000 { #address-cells = <1>; #size-cells = <0>; device_type = "network";@@ -186,7 +197,8 @@ phy-handle = <&phy3>; phy-connection-type = "rgmii-id"; }; - serial@4500 { + + serial0: serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>;@@ -195,7 +207,7 @@ interrupt-parent = <&mpic>; }; - serial@4600 { + serial1: serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>;@@ -222,7 +234,7 @@ }; }; - pcie@f8008000 { + pci0: pcie@f8008000 { compatible = "fsl,mpc8641-pcie"; device_type = "pci"; #interrupt-cells = <1>;@@ -430,7 +442,7 @@ }; - pcie@f8009000 { + pci1: pcie@f8009000 { compatible = "fsl,mpc8641-pcie"; device_type = "pci"; #interrupt-cells = <1>; --1.5.2.1.126.g6abd0
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev
Signature · 4 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [email protected] (403) 399-0195
Quoted 12 lines · Grant Likely
arch/powerpc/boot/dts/mpc8641_hpcn.dts line 28
Quoted 11 lines
arch/powerpc/boot/dts/mpc8641_hpcn.dts +10
-0+ aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + ethernet2 = &enet2; + ethernet3 = &enet3; + serial0 = &serial0; + serial1 = &serial1; + pci0 = &pci0; + pci1 = &pci1; + };
Quoted 2 lines
I had thought aliases were supposed to be full paths to nodes instead of phandles. Was I wrong?
Indeed, that is correct. And they are!
=> fdt addr c00000
=> fdt print /aliases
aliases {
ethernet0 = "/soc8641@f8000000/ethernet@24000";
ethernet1 = "/soc8641@f8000000/ethernet@25000";
ethernet2 = "/soc8641@f8000000/ethernet@26000";
ethernet3 = "/soc8641@f8000000/ethernet@27000";
serial0 = "/soc8641@f8000000/serial@4500";
serial1 = "/soc8641@f8000000/serial@4600";
pci0 = "/pcie@f8008000";
pci1 = "/pcie@f8009000";
};=> bootm 1000000 - c00000
Grant, you need to keep up, man. Just this morning I pushed Gibson's patch to DTC to support this. :-)
jdl
Quoted 8 lines · Jon Loeliger
Quoted 2 lines · Grant Likely
I had thought aliases were supposed to be full paths to nodes instead of phandles. Was I wrong?
Indeed, that is correct. And they are!
Grant, you need to keep up, man. Just this morning I pushed Gibson's patch to DTC to support this. :-)
Heh; I'm so behind. Thanks for the clarification.
g.
Signature · 4 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [email protected] (403) 399-0195
Quoted 31 lines · On Wed, 05 Dec 2007 12:05:07 -0600 Jon Loeliger <[email protected]> wrote:
Quoted 12 lines · Grant Likely
arch/powerpc/boot/dts/mpc8641_hpcn.dts line 28
Quoted 11 lines
arch/powerpc/boot/dts/mpc8641_hpcn.dts +10
-0+ aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + ethernet2 = &enet2; + ethernet3 = &enet3; + serial0 = &serial0; + serial1 = &serial1; + pci0 = &pci0; + pci1 = &pci1; + };Quoted 2 lines
I had thought aliases were supposed to be full paths to nodes instead of phandles. Was I wrong?
Indeed, that is correct. And they are!
=> fdt addr c00000
=> fdt print /aliasesaliases { ethernet0 = "/soc8641@f8000000/ethernet@24000"; ethernet1 = "/soc8641@f8000000/ethernet@25000"; ethernet2 = "/soc8641@f8000000/ethernet@26000"; ethernet3 = "/soc8641@f8000000/ethernet@27000"; serial0 = "/soc8641@f8000000/serial@4500"; serial1 = "/soc8641@f8000000/serial@4600"; pci0 = "/pcie@f8008000"; pci1 = "/pcie@f8009000"; };
Quoted 4 lines
=> bootm 1000000 - c00000
Grant, you need to keep up, man. Just this morning I pushed Gibson's patch to DTC to support this. :-)
So now the in-kernel version of DTC needs to support this.
josh
Quoted 12 lines · On Wed, 5 Dec 2007 10:38:38 -0700 Grant Likely wrote:
arch/powerpc/boot/dts/mpc8641_hpcn.dts line 28
Quoted 11 lines
arch/powerpc/boot/dts/mpc8641_hpcn.dts +10
-0+ aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + ethernet2 = &enet2; + ethernet3 = &enet3; + serial0 = &serial0; + serial1 = &serial1; + pci0 = &pci0; + pci1 = &pci1; + };
Quoted 2 lines
I had thought aliases were supposed to be full paths to nodes instead of phandles. Was I wrong?
no, but dwg did a patch for dtc to do that dirty work for you, resolving labels. I am also curious if such a change made it in dtc git (working with full path aliases now). dtc should prolly get tagged and next sub-rev to be clear if it supports aliases or not.
Signature · 1 line
Sincerely, Vitaly
Quoted 23 lines · Jon Loeliger
arch/powerpc/boot/dts/mpc8641_hpcn.dts +11
-0@@ -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>;
arch/powerpc/boot/dts/mpc8641_hpcn.dts line 124
Quoted 8 lines
arch/powerpc/boot/dts/mpc8641_hpcn.dts +1
-1@@ -107,7 +118,7 @@ }; }; - ethernet@24000 { + enet0: ethernet@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?
Mark
Quoted 36 lines · Mark A. Greer
Quoted 23 lines · Jon Loeliger
arch/powerpc/boot/dts/mpc8641_hpcn.dts +11
-0@@ -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>;arch/powerpc/boot/dts/mpc8641_hpcn.dts line 124
Quoted 8 lines
arch/powerpc/boot/dts/mpc8641_hpcn.dts +1
-1@@ -107,7 +118,7 @@ }; }; - ethernet@24000 { + enet0: ethernet@24000 { #address-cells = <1>; #size-cells = <0>; device_type = "network";This is probably a dumb question but I'll ask it anyway.
Quoted 2 lines
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.
Signature · 4 lines
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