]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: ftgmac100: Add support for board specific PHY interface address
authorThirupathaiah Annapureddy <thiruan@linux.microsoft.com>
Tue, 18 Aug 2020 00:08:26 +0000 (17:08 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 30 Sep 2020 20:48:18 +0000 (16:48 -0400)
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>
drivers/net/ftgmac100.c

index 5676a5b3ba938d34f3d935e6b8fe5f5f636afb23..00bda24f1fdad61cb5ff193ec80c069865313b58 100644 (file)
@@ -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;