net: phy: xilinx: Drop #ifdef CONFIG_DM_ETH around phy_connect_gmii2rgmii()
authorBin Meng <bmeng.cn@gmail.com>
Sun, 14 Mar 2021 12:14:51 +0000 (20:14 +0800)
committerPriyanka Jain <priyanka.jain@nxp.com>
Thu, 15 Apr 2021 08:52:17 +0000 (14:22 +0530)
At present phy_connect_gmii2rgmii() is implemented using a DM API
dev_of_offset() hence it cannot support a non-DM configuration.
Remove the non-DM version prototype of phy_connect_gmii2rgmii()
and make the driver depend on CONFIG_DM_ETH.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
drivers/net/phy/Kconfig
drivers/net/phy/phy.c

index d695030..070ffa8 100644 (file)
@@ -292,6 +292,7 @@ config PHY_XILINX
 
 config PHY_XILINX_GMII2RGMII
        bool "Xilinx GMII to RGMII Ethernet PHYs support"
+       depends on DM_ETH
        help
          This adds support for Xilinx GMII to RGMII IP core. This IP acts
          as bridge between MAC connected over GMII and external phy that
index d464379..c7cdf64 100644 (file)
@@ -942,15 +942,9 @@ void phy_connect_dev(struct phy_device *phydev, struct eth_device *dev)
 }
 
 #ifdef CONFIG_PHY_XILINX_GMII2RGMII
-#ifdef CONFIG_DM_ETH
 static struct phy_device *phy_connect_gmii2rgmii(struct mii_dev *bus,
                                                 struct udevice *dev,
                                                 phy_interface_t interface)
-#else
-static struct phy_device *phy_connect_gmii2rgmii(struct mii_dev *bus,
-                                                struct eth_device *dev,
-                                                phy_interface_t interface)
-#endif
 {
        struct phy_device *phydev = NULL;
        ofnode node = dev_ofnode(dev);