* [U-Boot] [PATCH BUGFIX] net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH
@ 2017-07-13 5:57 Lothar Waßmann
2017-07-13 14:45 ` Stefano Babic
0 siblings, 1 reply; 5+ messages in thread
From: Lothar Waßmann @ 2017-07-13 5:57 UTC (permalink / raw)
To: u-boot
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 <LW@KARO-electronics.de>
---
drivers/net/fec_mxc.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 4ad4ddc..e42d54b 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;
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH BUGFIX] net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH
2017-07-13 5:57 [U-Boot] [PATCH BUGFIX] net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH Lothar Waßmann
@ 2017-07-13 14:45 ` Stefano Babic
2017-07-14 6:47 ` Lothar Waßmann
2017-07-14 6:53 ` [U-Boot] [PATCH v2 " Lothar Waßmann
0 siblings, 2 replies; 5+ messages in thread
From: Stefano Babic @ 2017-07-13 14:45 UTC (permalink / raw)
To: u-boot
On 13/07/2017 07:57, Lothar Waßmann wrote:
> 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 <LW@KARO-electronics.de>
> ---
> drivers/net/fec_mxc.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
> index 4ad4ddc..e42d54b 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
Is it enough ? fec_get_miibus prototype is in include/netdev.h.
> {
> +#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
--
=====================================================================
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
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH BUGFIX] net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH
2017-07-13 14:45 ` Stefano Babic
@ 2017-07-14 6:47 ` Lothar Waßmann
2017-07-14 6:53 ` [U-Boot] [PATCH v2 " Lothar Waßmann
1 sibling, 0 replies; 5+ messages in thread
From: Lothar Waßmann @ 2017-07-14 6:47 UTC (permalink / raw)
To: u-boot
Hi,
On Thu, 13 Jul 2017 16:45:00 +0200 Stefano Babic wrote:
> On 13/07/2017 07:57, Lothar Waßmann wrote:
> > 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 <LW@KARO-electronics.de>
> > ---
> > drivers/net/fec_mxc.c | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
> > index 4ad4ddc..e42d54b 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
>
> Is it enough ? fec_get_miibus prototype is in include/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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH v2 BUGFIX] net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH
2017-07-13 14:45 ` Stefano Babic
2017-07-14 6:47 ` Lothar Waßmann
@ 2017-07-14 6:53 ` Lothar Waßmann
2017-07-28 11:45 ` Stefano Babic
1 sibling, 1 reply; 5+ messages in thread
From: Lothar Waßmann @ 2017-07-14 6:53 UTC (permalink / raw)
To: u-boot
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 <LW@KARO-electronics.de>
---
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(+)
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 4ad4ddc..e42d54b 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;
diff --git a/include/netdev.h b/include/netdev.h
index c06b908..b9bfeba 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -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,
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH v2 BUGFIX] net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH
2017-07-14 6:53 ` [U-Boot] [PATCH v2 " Lothar Waßmann
@ 2017-07-28 11:45 ` Stefano Babic
0 siblings, 0 replies; 5+ messages in thread
From: Stefano Babic @ 2017-07-28 11:45 UTC (permalink / raw)
To: u-boot
Hi Lothar,
On 14/07/2017 08:53, Lothar Waßmann wrote:
> 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 <LW@KARO-electronics.de>
> ---
> 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(+)
>
> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
> index 4ad4ddc..e42d54b 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;
>
> diff --git a/include/netdev.h b/include/netdev.h
> index c06b908..b9bfeba 100644
> --- a/include/netdev.h
> +++ b/include/netdev.h
> @@ -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,
>
Applied to u-boot-imx, -master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
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
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-07-28 11:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-13 5:57 [U-Boot] [PATCH BUGFIX] net: fec_mxc: adjust prototype of fec_get_miibus() for DM_ETH Lothar Waßmann
2017-07-13 14:45 ` Stefano Babic
2017-07-14 6:47 ` Lothar Waßmann
2017-07-14 6:53 ` [U-Boot] [PATCH v2 " Lothar Waßmann
2017-07-28 11:45 ` Stefano Babic
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.