Skip to content
Snippets Groups Projects
Commit cb5761f7 authored by Lothar Waßmann's avatar Lothar Waßmann Committed by Stefano Babic
Browse files

net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH


commit 306dd7da ("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: default avatarLothar Waßmann <LW@KARO-electronics.de>
parent f19955a0
No related branches found
No related tags found
No related merge requests found
...@@ -985,9 +985,18 @@ static void fec_free_descs(struct fec_priv *fec) ...@@ -985,9 +985,18 @@ static void fec_free_descs(struct fec_priv *fec)
free(fec->tbd_base); 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) 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; struct ethernet_regs *eth = (struct ethernet_regs *)base_addr;
#endif
struct mii_dev *bus; struct mii_dev *bus;
int ret; int ret;
......
...@@ -130,7 +130,12 @@ static inline int pci_eth_init(bd_t *bis) ...@@ -130,7 +130,12 @@ static inline int pci_eth_init(bd_t *bis)
return num; return num;
} }
#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); struct mii_dev *fec_get_miibus(uint32_t base_addr, int dev_id);
#endif
#ifdef CONFIG_PHYLIB #ifdef CONFIG_PHYLIB
struct phy_device; struct phy_device;
int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr, int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment