MLK-12766 net: fec: do not access reserved register for i.MX6ULL
authorPeng Fan <peng.fan@nxp.com>
Mon, 9 May 2016 08:53:32 +0000 (16:53 +0800)
committerYe Li <ye.li@nxp.com>
Wed, 5 Apr 2017 06:04:36 +0000 (14:04 +0800)
The MIB RAM and FIFO receive start register does not exist on
i.MX6ULL. Accessing these register will cause enet not work well or
cause system report fault.

Reported-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 5fb09cab9bb3cc4cef02239299d02cec666396ab)

drivers/net/fec_mxc.c

index 9b9556e..81e4e1c 100644 (file)
@@ -565,7 +565,7 @@ static int fec_init(struct eth_device *dev, bd_t *bd)
        writel(0x00000000, &fec->eth->gaddr2);
 
        /* Do not access reserved register for i.MX6UL */
-       if (!is_mx6ul()) {
+       if (!is_mx6ul() && !is_mx6ull()) {
                /* clear MIB RAM */
                for (i = mib_ptr; i <= mib_ptr + 0xfc; i += 4)
                        writel(0, i);