net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH
PATCH 1/1 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.
--- drivers/net/fec_mxc.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/net/fec_mxc.c +9 -0
@@ -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;
Signature · 1 line
2.1.4
PATCH 1/1 net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH
Quoted 17 lines · Lothar Waßmann
commit
306dd7dabd64("net:fec_mxc: fix PHY initialization bug withCONFIG_DM_ETH") has broken the build of thefec_mxcdriver withCONFIG_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 theDM_ETHcase.Signed-off-by Lothar Waßmann <[email protected]>--- drivers/net/fec_mxc.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/net/fec_mxc.c +0
-0
drivers/net/fec_mxc.c static void fec_free_descs(struct fec_priv *fec) · line 992
Quoted 8 lines
drivers/net/fec_mxc.c +4
-0@@ -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
Is it enough ? fec_get_miibus prototype is in include/netdev.h.
drivers/net/fec_mxc.c static void fec_free_descs(struct fec_priv *fec) · line 1002
Quoted 11 lines
drivers/net/fec_mxc.c +5
-0{ +#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;
Best regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 1/1 net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH
Hi,
Quoted 21 lines · On Thu, 13 Jul 2017 16:45:00 +0200 Stefano Babic wrote:
Quoted 20 lines · Lothar Waßmann
commit
306dd7dabd64("net:fec_mxc: fix PHY initialization bug withCONFIG_DM_ETH") has broken the build of thefec_mxcdriver withCONFIG_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 theDM_ETHcase.Signed-off-by Lothar Waßmann <[email protected]>--- drivers/net/fec_mxc.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/net/fec_mxc.c +0
-0@@ -985,9 +985,18 @@ static void fec_free_descs(struct fec_priv *fec)free (fec->tbd_base); }
Quoted 8 lines
drivers/net/fec_mxc.c static void fec_free_descs(struct fec_priv *fec) · line 992
Quoted 5 lines
drivers/net/fec_mxc.c +4
-0+#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 Is it enough ?
fec_get_miibusprototype is ininclude/netdev.h.
Sorry, I missed the include file when splitting the patch out into another working directory. I'll resend a corrected version.
Lothar Waßmann
PATCH v2 1/1 net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH
In reply to Stefano Babiccommit 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.
---
Changes vs. v1:
added missing prototype change in netdev.h
drivers/net/fec_mxc.c | 9 +++++++++ include/netdev.h | 5 +++++ 2 files changed, 14 insertions(+)
drivers/net/fec_mxc.c +9 -0
@@ -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;
include/netdev.h +5 -0
@@ -130,7 +130,12 @@ static inline int pci_eth_init(bd_t *bis)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); +#endif +#ifdef CONFIG_PHYLIB struct phy_device ; int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
Signature · 1 line
2.1.4
PATCH v2 1/1 net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH
Hi Lothar,
Quoted 47 lines · Lothar Waßmann
commit
306dd7dabd64("net:fec_mxc: fix PHY initialization bug withCONFIG_DM_ETH") has broken the build of thefec_mxcdriver withCONFIG_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 theDM_ETHcase.Signed-off-by Lothar Waßmann <[email protected]>---
Changes vs. v1:
added missing prototype change innetdev.hdrivers/net/fec_mxc.c | 9 +++++++++ include/netdev.h | 5 +++++ 2 files changed, 14 insertions(+)drivers/net/fec_mxc.c +9
-0@@ -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;include/netdev.h +0
-0@@ -130,7 +130,12 @@ static inline int pci_eth_init(bd_t *bis)return num; }
include/netdev.h static inline int pci_eth_init(bd_t *bis) · line 141
Quoted 10 lines
include/netdev.h +5
-0+#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_PHYLIB struct phy_device ; int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
Applied to u-boot-imx, -master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================