MLK-23209-3 imx: Update imx_get_mac_from_fuse for imx8mp
authorYe Li <ye.li@nxp.com>
Mon, 6 Jan 2020 08:39:19 +0000 (00:39 -0800)
committerYe Li <ye.li@nxp.com>
Thu, 29 Apr 2021 07:56:36 +0000 (00:56 -0700)
iMX8MP supports two ENET controllers, have to update the function to
enable loading two MAC addresses.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 61aebe41d5ba5f569cea233dec09da04539179bb)
(cherry picked from commit 6431d94c66c7eb36a049d25d45ca4afe05033da3)

arch/arm/mach-imx/mac.c

index 3b1496b..9bb63d2 100644 (file)
@@ -31,7 +31,7 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
 
        offset = is_mx6() ? MAC_FUSE_MX6_OFFSET : MAC_FUSE_MX7_OFFSET;
        fuse = (struct imx_mac_fuse *)(ulong)(OCOTP_BASE_ADDR + offset);
-       has_second_mac = is_mx7() || is_mx6sx() || is_mx6ul() || is_mx6ull();
+       has_second_mac = is_mx7() || is_mx6sx() || is_mx6ul() || is_mx6ull() || is_imx8mp();
 
        if (has_second_mac && dev_id == 1) {
                u32 value = readl(&fuse->mac_addr2);