Parcourir la source

net: ftgmac100: Add support for board specific PHY interface address

ftgmac100 driver is using hard-coded PHY interface address of zero.
Each board can have different PHY interface address (phy_addr).
This commit modifies the driver to make use of board specific address
by leveraging CONFIG_PHY_ADDR.

Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Thirupathaiah Annapureddy il y a 3 ans
Parent
commit
66e036bab5
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      drivers/net/ftgmac100.c

+ 4 - 0
drivers/net/ftgmac100.c

@@ -551,6 +551,10 @@ static int ftgmac100_probe(struct udevice *dev)
 	priv->max_speed = pdata->max_speed;
 	priv->phy_addr = 0;
 
+#ifdef CONFIG_PHY_ADDR
+	priv->phy_addr = CONFIG_PHY_ADDR;
+#endif
+
 	ret = clk_enable_bulk(&priv->clks);
 	if (ret)
 		goto out;