MLK-19580 net: fec: read MAC address from fuse
authorFugang Duan <fugang.duan@nxp.com>
Thu, 21 Mar 2019 06:28:36 +0000 (14:28 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
uboot fdt_fixup_ethernet() already add the "local-mac-address" property
for each net node when boot from net, the mac address read from fuse in
default. But for non-net boot or net is disabled in uboot, then kernel
also needs to read the MAC address from fuse. The patch add i.MX8MM platform
to read fuse from MAC in kernel in such case.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
drivers/net/ethernet/freescale/fec_fixup.c

index a044778..5e35578 100644 (file)
@@ -256,7 +256,8 @@ void fec_enet_get_mac_from_fuse(struct device_node *np, unsigned char *mac)
        else if (of_machine_is_compatible("fsl,imx8qxp"))
                imx8qm_get_mac_from_fuse(idx, mac,
                                         &imx8_fuse_mapping[IMX8QXP_FUSE]);
-       else if (of_machine_is_compatible("fsl,imx8mq"))
+       else if (of_machine_is_compatible("fsl,imx8mq") ||
+                of_machine_is_compatible("fsl,imx8mm"))
                imx8mq_get_mac_from_fuse(idx, mac);
 }