summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-05-05 08:35:06 +0800
committerPeng Fan <Peng.Fan@freescale.com>2015-05-05 14:41:16 +0800
commit679b7083f415f05f55d96e40e9cf8968390276f6 (patch)
tree7e49cc32d40d6f6294bf924ffe2b9c2563e35650
parente552c624a0721baaeba3a0e5f5f80d4987561567 (diff)
downloadu-boot-imx-679b7083f415f05f55d96e40e9cf8968390276f6.zip
u-boot-imx-679b7083f415f05f55d96e40e9cf8968390276f6.tar.gz
u-boot-imx-679b7083f415f05f55d96e40e9cf8968390276f6.tar.bz2
MLK-10812-6 net: fec: add platform check to avoid to access the reserved register
Add platform check to avoid to access the reserved register Signed-off-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
-rw-r--r--drivers/net/fec_mxc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 1771fd4..0743f7b 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -529,8 +529,10 @@ static int fec_open(struct eth_device *edev)
static int fec_init(struct eth_device *dev, bd_t* bd)
{
struct fec_priv *fec = (struct fec_priv *)dev->priv;
+#if !defined(CONFIG_MX6UL)
uint32_t mib_ptr = (uint32_t)&fec->eth->rmon_t_drop;
int i;
+#endif
/* Initialize MAC address */
fec_set_hwaddr(dev);
@@ -559,13 +561,14 @@ static int fec_init(struct eth_device *dev, bd_t* bd)
writel(0x00000000, &fec->eth->gaddr1);
writel(0x00000000, &fec->eth->gaddr2);
-
+#if !defined(CONFIG_MX6UL)
/* clear MIB RAM */
for (i = mib_ptr; i <= mib_ptr + 0xfc; i += 4)
writel(0, i);
/* FIFO receive start register */
writel(0x520, &fec->eth->r_fstart);
+#endif
/* size and address of each buffer */
writel(FEC_MAX_PKT_SIZE, &fec->eth->emrbr);