Commit f583165f authored by Jon Loeliger's avatar Jon Loeliger Committed by Paul Mackerras

[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: default avatarJon Loeliger <jdl@freescale.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 9a936a2e
...@@ -1196,7 +1196,7 @@ platforms are moved over to use the flattened-device-tree model. ...@@ -1196,7 +1196,7 @@ platforms are moved over to use the flattened-device-tree model.
- model : Model of the device. Can be "TSEC", "eTSEC", or "FEC" - model : Model of the device. Can be "TSEC", "eTSEC", or "FEC"
- compatible : Should be "gianfar" - compatible : Should be "gianfar"
- reg : Offset and length of the register set for the device - reg : Offset and length of the register set for the device
- address : List of bytes representing the ethernet address of - mac-address : List of bytes representing the ethernet address of
this controller this controller
- interrupts : <a b> where a is the interrupt number and b is a - interrupts : <a b> where a is the interrupt number and b is a
field that represents an encoding of the sense and level 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,7 +1216,7 @@ platforms are moved over to use the flattened-device-tree model.
model = "TSEC"; model = "TSEC";
compatible = "gianfar"; compatible = "gianfar";
reg = <24000 1000>; reg = <24000 1000>;
address = [ 00 E0 0C 00 73 00 ]; mac-address = [ 00 E0 0C 00 73 00 ];
interrupts = <d 3 e 3 12 3>; interrupts = <d 3 e 3 12 3>;
interrupt-parent = <40000>; interrupt-parent = <40000>;
phy-handle = <2452000> phy-handle = <2452000>
...@@ -1498,7 +1498,7 @@ not necessary as they are usually the same as the root node. ...@@ -1498,7 +1498,7 @@ not necessary as they are usually the same as the root node.
model = "TSEC"; model = "TSEC";
compatible = "gianfar"; compatible = "gianfar";
reg = <24000 1000>; reg = <24000 1000>;
address = [ 00 E0 0C 00 73 00 ]; mac-address = [ 00 E0 0C 00 73 00 ];
interrupts = <d 3 e 3 12 3>; interrupts = <d 3 e 3 12 3>;
interrupt-parent = <40000>; interrupt-parent = <40000>;
phy-handle = <2452000>; phy-handle = <2452000>;
...@@ -1511,7 +1511,7 @@ not necessary as they are usually the same as the root node. ...@@ -1511,7 +1511,7 @@ not necessary as they are usually the same as the root node.
model = "TSEC"; model = "TSEC";
compatible = "gianfar"; compatible = "gianfar";
reg = <25000 1000>; reg = <25000 1000>;
address = [ 00 E0 0C 00 73 01 ]; mac-address = [ 00 E0 0C 00 73 01 ];
interrupts = <13 3 14 3 18 3>; interrupts = <13 3 14 3 18 3>;
interrupt-parent = <40000>; interrupt-parent = <40000>;
phy-handle = <2452001>; phy-handle = <2452001>;
...@@ -1524,7 +1524,7 @@ not necessary as they are usually the same as the root node. ...@@ -1524,7 +1524,7 @@ not necessary as they are usually the same as the root node.
model = "FEC"; model = "FEC";
compatible = "gianfar"; compatible = "gianfar";
reg = <26000 1000>; reg = <26000 1000>;
address = [ 00 E0 0C 00 73 02 ]; mac-address = [ 00 E0 0C 00 73 02 ];
interrupts = <19 3>; interrupts = <19 3>;
interrupt-parent = <40000>; interrupt-parent = <40000>;
phy-handle = <2452002>; phy-handle = <2452002>;
......
...@@ -169,8 +169,16 @@ static int __init gfar_of_init(void) ...@@ -169,8 +169,16 @@ static int __init gfar_of_init(void)
goto err; goto err;
} }
mac_addr = get_property(np, "address", NULL); mac_addr = get_property(np, "local-mac-address", NULL);
memcpy(gfar_data.mac_addr, mac_addr, 6); if (mac_addr == NULL)
mac_addr = get_property(np, "mac-address", NULL);
if (mac_addr == NULL) {
/* Obsolete */
mac_addr = get_property(np, "address", NULL);
}
if (mac_addr)
memcpy(gfar_data.mac_addr, mac_addr, 6);
if (model && !strcasecmp(model, "TSEC")) if (model && !strcasecmp(model, "TSEC"))
gfar_data.device_flags = gfar_data.device_flags =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment