summaryrefslogtreecommitdiffstats
path: root/drivers/net/fec_mxc.c
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2012-10-22 16:40:42 +0000
committerStefano Babic <sbabic@denx.de>2013-01-28 06:57:50 +0100
commiteef2448039c43493b2f9def6f257f1006fb0e956 (patch)
tree84a028193b0e5df635dea61a631ce0b2aed9e636 /drivers/net/fec_mxc.c
parent575c5cc06f63d02fda73c7b29c6d782de4df6393 (diff)
downloadtalos-obmc-uboot-eef2448039c43493b2f9def6f257f1006fb0e956.tar.gz
talos-obmc-uboot-eef2448039c43493b2f9def6f257f1006fb0e956.zip
net: fec_mxc: have fecmxc_initialize call fecmxc_initialize_multi
Having only one call to fec_probe will ease the changing of its parameters. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Diffstat (limited to 'drivers/net/fec_mxc.c')
-rw-r--r--drivers/net/fec_mxc.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index eb89e573cb..f7384ad708 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1021,27 +1021,19 @@ err1:
return ret;
}
-#ifdef CONFIG_FEC_MXC_PHYADDR
-int fecmxc_initialize(bd_t *bd)
-{
- int lout = 1;
-
- debug("eth_init: fec_probe(bd)\n");
- lout = fec_probe(bd, -1, CONFIG_FEC_MXC_PHYADDR, IMX_FEC_BASE);
-
- return lout;
-}
-#endif
-
int fecmxc_initialize_multi(bd_t *bd, int dev_id, int phy_id, uint32_t addr)
{
- int lout = 1;
-
debug("eth_init: fec_probe(bd, %i, %i) @ %08x\n", dev_id, phy_id, addr);
- lout = fec_probe(bd, dev_id, phy_id, addr);
+ return fec_probe(bd, dev_id, phy_id, addr);
+}
- return lout;
+#ifdef CONFIG_FEC_MXC_PHYADDR
+int fecmxc_initialize(bd_t *bd)
+{
+ return fecmxc_initialize_multi(bd, -1, CONFIG_FEC_MXC_PHYADDR,
+ IMX_FEC_BASE);
}
+#endif
#ifndef CONFIG_PHYLIB
int fecmxc_register_mii_postcall(struct eth_device *dev, int (*cb)(int))
OpenPOWER on IntegriCloud