From: Thirupathaiah Annapureddy Date: Tue, 18 Aug 2020 00:08:26 +0000 (-0700) Subject: net: ftgmac100: Add support for board specific PHY interface address X-Git-Tag: v2021.10~497^2~6^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66e036bab503cddd6afbfecc8b7fcd8941d8bd7d;p=platform%2Fkernel%2Fu-boot.git 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 Reviewed-by: Cédric Le Goater --- diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c index 5676a5b..00bda24 100644 --- a/drivers/net/ftgmac100.c +++ b/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;