Message ID | 20180415194554.4859-1-lukma@denx.de |
---|---|
State | Accepted |
Commit | 178d4f009990feeb01cb2d0002faf6dcca221968 |
Delegated to: | Stefano Babic |
Headers | show |
Series | [U-Boot] eth: dm: fec: Change FEC PHY mask setting from CONFIG_PHYLIB to CONFIG_FEC_MXC_PHYADDR | expand |
On 15/04/2018 21:45, Lukasz Majewski wrote: > Without this commit we do have an explicit dependency on CONFIG_PHYLIB > when one wants to set PHY ADDR on a iMX board (FEC + driver model). > > This shall be changed to CONFIG_FEC_MXC_PHYADDR, as only when we do have > it set, we shall mask out other devices. > > As a side effect, when CONFIG_FEC_MXC_PHYADDR is not set, we scan PHY bus > for connected PHY devices. > > Signed-off-by: Lukasz Majewski <lukma@denx.de> > > --- > > drivers/net/fec_mxc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c > index 3dc2816da0..2027d17fac 100644 > --- a/drivers/net/fec_mxc.c > +++ b/drivers/net/fec_mxc.c > @@ -1215,7 +1215,7 @@ static int fec_phy_init(struct fec_priv *priv, struct udevice *dev) > struct phy_device *phydev; > int mask = 0xffffffff; > > -#ifdef CONFIG_PHYLIB > +#ifdef CONFIG_FEC_MXC_PHYADDR > mask = 1 << CONFIG_FEC_MXC_PHYADDR; > #endif > > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 3dc2816da0..2027d17fac 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1215,7 +1215,7 @@ static int fec_phy_init(struct fec_priv *priv, struct udevice *dev) struct phy_device *phydev; int mask = 0xffffffff; -#ifdef CONFIG_PHYLIB +#ifdef CONFIG_FEC_MXC_PHYADDR mask = 1 << CONFIG_FEC_MXC_PHYADDR; #endif
Without this commit we do have an explicit dependency on CONFIG_PHYLIB when one wants to set PHY ADDR on a iMX board (FEC + driver model). This shall be changed to CONFIG_FEC_MXC_PHYADDR, as only when we do have it set, we shall mask out other devices. As a side effect, when CONFIG_FEC_MXC_PHYADDR is not set, we scan PHY bus for connected PHY devices. Signed-off-by: Lukasz Majewski <lukma@denx.de> --- drivers/net/fec_mxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)