summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2016-02-25 13:34:11 +0800
committerYe Li <ye.li@nxp.com>2016-03-25 15:03:42 +0800
commit088afc073c480bd02208145bfb04259ccdf391c1 (patch)
tree6d09754c6bb45fe1de9b841bbb69c0e6f9559873 /drivers
parent0816a496fbe3f7d0e4f1a9322c76908a5c557c8c (diff)
downloadu-boot-imx-088afc073c480bd02208145bfb04259ccdf391c1.zip
u-boot-imx-088afc073c480bd02208145bfb04259ccdf391c1.tar.gz
u-boot-imx-088afc073c480bd02208145bfb04259ccdf391c1.tar.bz2
MLK-12452-1 FEC: Update fec driver to support two MDIO
On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. Some boards share the MDIO port for the two enets. So introduce a configuration CONFIG_FEC_MXC_MDIO_BASE to indicate the MDIO port for sharing. Without defining this configuration, the enet will uses own MDIO port. Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/fec_mxc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 3340dd2..765ac7a 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -4,6 +4,7 @@
* (C) Copyright 2008 Armadeus Systems nc
* (C) Copyright 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
* (C) Copyright 2007 Pengutronix, Juergen Beisert <j.beisert@pengutronix.de>
+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
*
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -1100,8 +1101,12 @@ int fecmxc_initialize_multi(bd_t *bd, int dev_id, int phy_id, uint32_t addr)
*/
base_mii = MXS_ENET0_BASE;
#else
+#ifdef CONFIG_FEC_MXC_MDIO_BASE
+ base_mii = CONFIG_FEC_MXC_MDIO_BASE;
+#else
base_mii = addr;
#endif
+#endif
debug("eth_init: fec_probe(bd, %i, %i) @ %08x\n", dev_id, phy_id, addr);
bus = fec_get_miibus(base_mii, dev_id);
if (!bus)