From: Peng Fan Date: Wed, 10 Jan 2018 05:20:43 +0000 (+0800) Subject: net: fec: do not access reserved register for i.MX8M X-Git-Tag: v2018.03-rc2~47^2~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=238a53c71010ea15e38ab0253316a7ac2fd8035c;p=platform%2Fkernel%2Fu-boot.git net: fec: do not access reserved register for i.MX8M 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 Acked-by: Joe Hershberger Reviewed-by: Stefano Babic Reviewed-by: Fabio Estevam Reviewed-by: Stefano Babic --- diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 433e19f..4cbc8cb 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -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);