diff options
| author | Lothar Waßmann <[email protected]> | 2017-07-14 08:53:57 +0200 |
|---|---|---|
| committer | Stefano Babic <[email protected]> | 2017-07-28 13:41:49 +0200 |
| commit | cb5761f774dffeff7cf19d40803613db7089c9af (patch) | |
| tree | c4fe27b8972faab3bd5e33a5a24ae105c510c454 /drivers | |
| parent | f19955a01482d118eac0fdaf530ec6e5b08cf414 (diff) | |
net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH
commit 306dd7dabd64 ("net: fec_mxc: fix PHY initialization bug with CONFIG_DM_ETH")
has broken the build of the fec_mxc driver with CONFIG_DM_ETH
enabled because it changed the parameters passed to *fec_get_miibus()
without changing the functions prototype.
This patch fixes up the prototype of fec_get_miibus() for the DM_ETH case.
Signed-off-by: Lothar Waßmann <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/fec_mxc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 40be52070ea..dc7b5127ebd 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -985,9 +985,18 @@ static void fec_free_descs(struct fec_priv *fec) free(fec->tbd_base); } +#ifdef CONFIG_DM_ETH +struct mii_dev *fec_get_miibus(struct udevice *dev, int dev_id) +#else struct mii_dev *fec_get_miibus(uint32_t base_addr, int dev_id) +#endif { +#ifdef CONFIG_DM_ETH + struct fec_priv *priv = dev_get_priv(dev); + struct ethernet_regs *eth = priv->eth; +#else struct ethernet_regs *eth = (struct ethernet_regs *)base_addr; +#endif struct mii_dev *bus; int ret; |
