ARM: mx28: Skip OCOTP FEC MAC setup if in DT
ARM: mx28: Skip OCOTP FEC MAC setup if in DT

Currently, the kernel unconditionally adds "local-mac-address" and
"mac-address" properties under both FEC ethernet DT nodes in case
the update_fec_mac_prop() function is called. These properties are
loaded with MAC address compiled from vendors OUI and a per-device
NIC saved in OCOTP storage.

Some more advanced bootloaders do augment the DT passed to the kernel
by these properties already. In such case, it is wrong for kernel to
override these values.

Adjust the FEC MAC address loading so that in case the DT properties
are already present in the DT passed from the bootloader, skip the
loading from OCOTP altogether. If the DT properties are not present,
load them from OCOTP.

Note that the later case will lead to zeroed out MAC address if OCOTP
is not programmed. This will lead to FEC not working at all.

Signed-off-by: Marek Vasut <f40600653b33f5282fa4c5daf377dfc444fb4625@denx.de>
Cc: Fabio Estevam <679188261afeb60eb822cd934fd7b46a48ddd743@freescale.com>
Signed-off-by: Shawn Guo <912cf7eb7d8018e2943586ae6657d21fd4e38239@linaro.org>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas