summaryrefslogtreecommitdiff
path: root/drivers/net/mxc_fec.c
diff options
context:
space:
mode:
authorJason Liu <r64343@freescale.com>2012-02-07 19:22:03 +0800
committerJason Liu <r64343@freescale.com>2012-02-07 20:11:42 +0800
commitb0c01ae20009b2b5de40d8196d2f5d2b852b84f0 (patch)
tree54c68e7668e810096f11e307cfa1587b25dc932e /drivers/net/mxc_fec.c
parent309835257e5b1f21a4f905fd3f6d9f2d44a651e7 (diff)
downloadu-boot-imx-b0c01ae20009b2b5de40d8196d2f5d2b852b84f0.zip
u-boot-imx-b0c01ae20009b2b5de40d8196d2f5d2b852b84f0.tar.gz
u-boot-imx-b0c01ae20009b2b5de40d8196d2f5d2b852b84f0.tar.bz2
ENGR00173966-2: fec: add i.mx6dl support
This patch add i.mx6dl support for fec driver i.mx6dl and i.mx6dq shares the same ENET IP. Signed-off-by: Jason Liu <r64343@freescale.com>
Diffstat (limited to 'drivers/net/mxc_fec.c')
-rw-r--r--drivers/net/mxc_fec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/mxc_fec.c b/drivers/net/mxc_fec.c
index 42d687a..6482de7 100644
--- a/drivers/net/mxc_fec.c
+++ b/drivers/net/mxc_fec.c
@@ -76,7 +76,7 @@
#define FEC_MII_WRITE(pa, ra, v) (FEC_MII_FRAME | FEC_MII_OP(FEC_MII_OP_WR)|\
FEC_MII_PA(pa) | FEC_MII_RA(ra) | FEC_MII_SET_DATA(v))
-#if defined (CONFIG_MX6Q)
+#if defined(CONFIG_MX6Q) || defined(CONFIG_MX6DL)
extern int mx6_rgmii_rework(char *devname, int phy_addr);
#endif
#if defined(CONFIG_MX6Q_ARM2) || defined(CONFIG_MX6Q_SABRESD)
@@ -438,7 +438,7 @@ static void setFecDuplexSpeed(volatile fec_t *fecp, unsigned char addr,
fecp->tcr &= ~FEC_TCR_FDEN;
}
-#ifdef CONFIG_MX6Q
+#if defined(CONFIG_MX6Q) || defined(CONFIG_MX6DL)
if ((dup_spd & 0xFFFF) == _1000BASET) {
fecp->ecr |= (0x1 << 5);
} else if ((dup_spd & 0xFFFF) == _100BASET) {
@@ -836,7 +836,7 @@ static void fec_mii_phy_init(struct eth_device *dev)
#if defined (CONFIG_CMD_MII) || defined (CONFIG_MII) || \
defined (CONFIG_DISCOVER_PHY)
mxc_fec_mii_init(fecp);
-#if defined (CONFIG_MX6Q)
+#if defined(CONFIG_MX6Q) || defined(CONFIG_MX6DL)
mx6_rgmii_rework(dev->name, info->phy_addr);
#endif
mxc_fec_phy_powerup(dev->name, info->phy_addr);
@@ -886,7 +886,7 @@ int fec_init(struct eth_device *dev, bd_t *bd)
/* Set maximum receive buffer size. */
fecp->emrbr = PKT_MAXBLR_SIZE;
-#ifdef CONFIG_MX6Q
+#if defined(CONFIG_MX6Q) || defined(CONFIG_MX6DL)
fecp->rcr &= ~(0x100);
fecp->rcr |= 0x44;
#endif
@@ -939,7 +939,7 @@ int fec_init(struct eth_device *dev, bd_t *bd)
fecp->etdsr = (uint)(&info->txbd[0]);
#endif
-#ifdef CONFIG_MX6Q
+#if defined(CONFIG_MX6Q) || defined(CONFIG_MX6DL)
/* Enable Swap to support little-endian device */
fecp->ecr |= FEC_ECR_DBSWP;