aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Loeliger <jdl@jdl.com>2006-08-17 09:42:35 -0400
committerPaul Mackerras <paulus@samba.org>2006-08-17 19:50:16 -0400
commitf583165f6a926e9f27ff8d15c0e4b22e83f0d599 (patch)
treed4765340b1184a4a94565bbad197cb7b2488d6d1
parent9a936a2e0526089194159eae31238e36b1c19e74 (diff)
[POWERPC] Convert to mac-address for ethernet MAC address data.
Also accept "local-mac-address". However the old "address" is now obsolete, but accepted for backwards compatibility. It should be removed after all device trees have been converted to use "mac-address". Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--Documentation/powerpc/booting-without-of.txt10
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c12
2 files changed, 15 insertions, 7 deletions
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index 3c62e66e1fcc..8c48b8a27b9c 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -1196,7 +1196,7 @@ platforms are moved over to use the flattened-device-tree model.
1196 - model : Model of the device. Can be "TSEC", "eTSEC", or "FEC" 1196 - model : Model of the device. Can be "TSEC", "eTSEC", or "FEC"
1197 - compatible : Should be "gianfar" 1197 - compatible : Should be "gianfar"
1198 - reg : Offset and length of the register set for the device 1198 - reg : Offset and length of the register set for the device
1199 - address : List of bytes representing the ethernet address of 1199 - mac-address : List of bytes representing the ethernet address of
1200 this controller 1200 this controller
1201 - interrupts : <a b> where a is the interrupt number and b is a 1201 - interrupts : <a b> where a is the interrupt number and b is a
1202 field that represents an encoding of the sense and level 1202 field that represents an encoding of the sense and level
@@ -1216,7 +1216,7 @@ platforms are moved over to use the flattened-device-tree model.
1216 model = "TSEC"; 1216 model = "TSEC";
1217 compatible = "gianfar"; 1217 compatible = "gianfar";
1218 reg = <24000 1000>; 1218 reg = <24000 1000>;
1219 address = [ 00 E0 0C 00 73 00 ]; 1219 mac-address = [ 00 E0 0C 00 73 00 ];
1220 interrupts = <d 3 e 3 12 3>; 1220 interrupts = <d 3 e 3 12 3>;
1221 interrupt-parent = <40000>; 1221 interrupt-parent = <40000>;
1222 phy-handle = <2452000> 1222 phy-handle = <2452000>
@@ -1498,7 +1498,7 @@ not necessary as they are usually the same as the root node.
1498 model = "TSEC"; 1498 model = "TSEC";
1499 compatible = "gianfar"; 1499 compatible = "gianfar";
1500 reg = <24000 1000>; 1500 reg = <24000 1000>;
1501 address = [ 00 E0 0C 00 73 00 ]; 1501 mac-address = [ 00 E0 0C 00 73 00 ];
1502 interrupts = <d 3 e 3 12 3>; 1502 interrupts = <d 3 e 3 12 3>;
1503 interrupt-parent = <40000>; 1503 interrupt-parent = <40000>;
1504 phy-handle = <2452000>; 1504 phy-handle = <2452000>;
@@ -1511,7 +1511,7 @@ not necessary as they are usually the same as the root node.
1511 model = "TSEC"; 1511 model = "TSEC";
1512 compatible = "gianfar"; 1512 compatible = "gianfar";
1513 reg = <25000 1000>; 1513 reg = <25000 1000>;
1514 address = [ 00 E0 0C 00 73 01 ]; 1514 mac-address = [ 00 E0 0C 00 73 01 ];
1515 interrupts = <13 3 14 3 18 3>; 1515 interrupts = <13 3 14 3 18 3>;
1516 interrupt-parent = <40000>; 1516 interrupt-parent = <40000>;
1517 phy-handle = <2452001>; 1517 phy-handle = <2452001>;
@@ -1524,7 +1524,7 @@ not necessary as they are usually the same as the root node.
1524 model = "FEC"; 1524 model = "FEC";
1525 compatible = "gianfar"; 1525 compatible = "gianfar";
1526 reg = <26000 1000>; 1526 reg = <26000 1000>;
1527 address = [ 00 E0 0C 00 73 02 ]; 1527 mac-address = [ 00 E0 0C 00 73 02 ];
1528 interrupts = <19 3>; 1528 interrupts = <19 3>;
1529 interrupt-parent = <40000>; 1529 interrupt-parent = <40000>;
1530 phy-handle = <2452002>; 1530 phy-handle = <2452002>;
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index e983972132d8..12b65609c072 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -169,8 +169,16 @@ static int __init gfar_of_init(void)
169 goto err; 169 goto err;
170 } 170 }
171 171
172 mac_addr = get_property(np, "address", NULL); 172 mac_addr = get_property(np, "local-mac-address", NULL);
173 memcpy(gfar_data.mac_addr, mac_addr, 6); 173 if (mac_addr == NULL)
174 mac_addr = get_property(np, "mac-address", NULL);
175 if (mac_addr == NULL) {
176 /* Obsolete */
177 mac_addr = get_property(np, "address", NULL);
178 }
179
180 if (mac_addr)
181 memcpy(gfar_data.mac_addr, mac_addr, 6);
174 182
175 if (model && !strcasecmp(model, "TSEC")) 183 if (model && !strcasecmp(model, "TSEC"))
176 gfar_data.device_flags = 184 gfar_data.device_flags =