Skip to content

Commit

Permalink
eth: dm: fec: Change FEC PHY mask setting from CONFIG_PHYLIB to CONFI…
Browse files Browse the repository at this point in the history
…G_FEC_MXC_PHYADDR

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 <[email protected]>
  • Loading branch information
Lukasz Majewski authored and sbabic committed Apr 26, 2018
1 parent f3c3262 commit 178d4f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/fec_mxc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,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

Expand Down

0 comments on commit 178d4f0

Please sign in to comment.