From patchwork Tue Oct 23 02:40:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot, V3, 4/9] net: fec_mxc: have fecmxc_initialize call fecmxc_initialize_multi X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 193316 X-Patchwork-Delegate: sbabic@denx.de Message-Id: <1350960047-23404-5-git-send-email-troy.kisky@boundarydevices.com> To: u-boot@lists.denx.de, Joe Hershberger , sbabic@denx.de, dirk.behme@googlemail.com Cc: afleming@gmail.com Date: Mon, 22 Oct 2012 19:40:42 -0700 From: Troy Kisky List-Id: U-Boot discussion Having only one call to fec_probe will ease the changing of its parameters. Signed-off-by: Troy Kisky --- drivers/net/fec_mxc.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index eb89e57..f7384ad 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))