MLK-14938-16 net: fec: do not access reserved register for i.MX8
authorYe Li <ye.li@nxp.com>
Thu, 27 Apr 2017 18:51:45 +0000 (13:51 -0500)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:36:50 +0000 (02:36 +0800)
The MIB RAM and FIFO receive start register does not exist on
i.MX8. Accessing these register will cause SERROR in kernel.

Signed-off-by: Ye Li <ye.li@nxp.com>
drivers/net/fec_mxc.c

index 263988b..023c004 100644 (file)
@@ -565,8 +565,8 @@ static int fec_init(struct eth_device *dev, bd_t *bd)
        writel(0x00000000, &fec->eth->gaddr1);
        writel(0x00000000, &fec->eth->gaddr2);
 
-       /* Do not access reserved register for i.MX6UL */
-       if (!is_mx6ul() && !is_mx6ull()) {
+       /* Do not access reserved register for i.MX6UL/6ULL/i.MX8 */
+       if (!is_mx6ul() && !is_mx6ull() && !is_imx8()) {
                /* clear MIB RAM */
                for (i = mib_ptr; i <= mib_ptr + 0xfc; i += 4)
                        writel(0, i);