Commit 29e96fe9 authored by Radhey Shyam Pandey's avatar Radhey Shyam Pandey Committed by David S. Miller
Browse files

net: macb: In ZynqMP initialization make SGMII phy configuration optional



In the macb binding documentation "phys" is an optional property. Make
implementation in line with it. This change allows the traditional flow
in which first stage bootloader does PS-GT configuration to work along
with newer use cases in which PS-GT configuration is managed by the
phy-zynqmp driver.

It fixes below macb probe failure when macb DT node doesn't have SGMII
phys handle.
"macb ff0b0000.ethernet: error -ENODEV: failed to get PS-GTR PHY"

Signed-off-by: default avatarRadhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Reviewed-by: default avatarMichal Simek <michal.simek@xilinx.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3ac8316e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4588,7 +4588,7 @@ static int zynqmp_init(struct platform_device *pdev)

	if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII) {
		/* Ensure PS-GTR PHY device used in SGMII mode is ready */
		bp->sgmii_phy = devm_phy_get(&pdev->dev, "sgmii-phy");
		bp->sgmii_phy = devm_phy_optional_get(&pdev->dev, NULL);

		if (IS_ERR(bp->sgmii_phy)) {
			ret = PTR_ERR(bp->sgmii_phy);