Revert "net: macb: Avoid 20s boot delay by skipping MDIO bus registration for fixed-link PHY"
This reverts commit f93e3153c5
.
This commit is contained in:
parent
beff299a4a
commit
11b289f4f9
1 changed files with 3 additions and 11 deletions
|
@ -742,6 +742,9 @@ static int macb_mdiobus_register(struct macb *bp)
|
|||
{
|
||||
struct device_node *child, *np = bp->pdev->dev.of_node;
|
||||
|
||||
if (of_phy_is_fixed_link(np))
|
||||
return mdiobus_register(bp->mii_bus);
|
||||
|
||||
/* Only create the PHY from the device tree if at least one PHY is
|
||||
* described. Otherwise scan the entire MDIO bus. We do this to support
|
||||
* old device tree that did not follow the best practices and did not
|
||||
|
@ -762,19 +765,8 @@ static int macb_mdiobus_register(struct macb *bp)
|
|||
|
||||
static int macb_mii_init(struct macb *bp)
|
||||
{
|
||||
struct device_node *child, *np = bp->pdev->dev.of_node;
|
||||
int err = -ENXIO;
|
||||
|
||||
/* With fixed-link, we don't need to register the MDIO bus,
|
||||
* except if we have a child named "mdio" in the device tree.
|
||||
* In that case, some devices may be attached to the MACB's MDIO bus.
|
||||
*/
|
||||
child = of_get_child_by_name(np, "mdio");
|
||||
if (child)
|
||||
of_node_put(child);
|
||||
else if (of_phy_is_fixed_link(np))
|
||||
return macb_mii_probe(bp->dev);
|
||||
|
||||
/* Enable management port */
|
||||
macb_writel(bp, NCR, MACB_BIT(MPE));
|
||||
|
||||
|
|
Loading…
Reference in a new issue