MLK-9694 ARM: imx6: init enet MAC address
authorFugang Duan <b38611@freescale.com>
Wed, 15 Oct 2014 01:36:40 +0000 (09:36 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:46:51 +0000 (14:46 -0500)
commit75e6e706595fc3d3be4d285f17b042fcfde9d74b
treeeb9c95cf13e325b67e2296af007e936bbc1d9454
parent91e968b5551ad66125e1dc72d7cabd5208326c7c
MLK-9694 ARM: imx6: init enet MAC address

Enet get MAC address order:
From module parameters or kernel command line -> device tree ->
pfuse -> mac registers set by bootloader -> random mac address.

When there have no "fec.macaddr" parameters set in kernel command
line, enet driver get MAC address from device tree. And then if
the MAC address set in device tree and is valid, enet driver get
MAC address from device tree. Otherwise,enet get MAarch/arm/mach-imx
/mach-imx6q.cC address from
pfuse. So, in the condition, update the MAC address (read from pfuse)
to device tree.

Cherry-pick & Merge patches from:
149ac988a25b8d8eb86d05679cbb7b42819ff7a1 &
3269e5c06bdb2f7ab9bd5afa9bbfe46d872197d3

Signed-off-by: Fugang Duan <B38611@freescale.com>
arch/arm/mach-imx/common.h
arch/arm/mach-imx/mach-imx6q.c
arch/arm/mach-imx/mach-imx6sl.c
arch/arm/mach-imx/mach-imx6sx.c
arch/arm/mach-imx/mach-imx7d.c