PHY_INTERFACE_MODE_RGMII_ID);
}
- if (!lp->phy_dev) {
+ if (!lp->phy_dev)
dev_err(lp->dev, "of_phy_connect() failed\n");
- return -ENODEV;
- }
- phy_start(lp->phy_dev);
+ else
+ phy_start(lp->phy_dev);
}
/* Enable tasklets for Axi DMA error handling */
lp->coalesce_count_tx = XAXIDMA_DFT_TX_THRESHOLD;
lp->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0);
- ret = axienet_mdio_setup(lp, op->dev.of_node);
+ if (lp->phy_node)
+ ret = axienet_mdio_setup(lp, op->dev.of_node);
if (ret)
dev_warn(&op->dev, "error registering MDIO bus\n");