diff options
author | Timur Tabi <timur@freescale.com> | 2007-02-16 13:01:29 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-02-16 18:21:25 -0500 |
commit | 29cfe6f4fb7d187f65564764a0ecf2caf9d8ed58 (patch) | |
tree | acd07e68e6c426d7fc21606acd27bf21c06df0aa /include/asm-powerpc/prom.h | |
parent | a32525449b30dfbae804f6b05cde041f35f5a811 (diff) |
[POWERPC] add of_get_mac_address and update fsl_soc.c to use it
Add function of_get_mac_address(), which obtains the best MAC address to use
from the device tree by checking various properties in order. The order is:
'mac-address', then 'local-mac-address', then 'address'. It skips properties
that contain invalid MAC addresses, which were probably not initialized
by U-Boot.
Update gfar_of_init() and fs_enet_of_init() in fsl_soc.c to call
of_get_mac_address().
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/prom.h')
-rw-r--r-- | include/asm-powerpc/prom.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 0afee17f33b4..020ed015a94b 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -255,6 +255,8 @@ extern void kdump_move_device_tree(void); | |||
255 | /* CPU OF node matching */ | 255 | /* CPU OF node matching */ |
256 | struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); | 256 | struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); |
257 | 257 | ||
258 | /* Get the MAC address */ | ||
259 | extern const void *of_get_mac_address(struct device_node *np); | ||
258 | 260 | ||
259 | /* | 261 | /* |
260 | * OF interrupt mapping | 262 | * OF interrupt mapping |