net: fec: do not access reserved register for i.MX8M
authorPeng Fan <peng.fan@nxp.com>
Wed, 10 Jan 2018 05:20:43 +0000 (13:20 +0800)
committerStefano Babic <sbabic@denx.de>
Sun, 4 Feb 2018 11:00:58 +0000 (12:00 +0100)
The MIB RAM and FIFO receive start register does not exist on
i.MX8M. Accessing these register will cause system hang.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
drivers/net/fec_mxc.c

index 433e19f0f81ccf9a416071d5dd54d8f7f5c6bc43..4cbc8cbbfd5c9e1a77ba2b8076f039ea9284a501 100644 (file)
@@ -562,8 +562,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 */
+       if (!is_mx6ul() && !is_mx6ull() && !is_mx8m()) {
                /* clear MIB RAM */
                for (i = mib_ptr; i <= mib_ptr + 0xfc; i += 4)
                        writel(0, i);