diff options
author | Tom Rini <trini@konsulko.com> | 2022-11-27 10:25:20 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-12-07 16:04:17 -0500 |
commit | 36af92ba85ad45dfb07f1d17e8b7d6945c1ac0b4 (patch) | |
tree | 05f0600944247694f49027a446c50ae45e283d99 /drivers/net/phy | |
parent | 32dc6772762dc7bb3f112822729d2369b98aa842 (diff) | |
download | u-boot-36af92ba85ad45dfb07f1d17e8b7d6945c1ac0b4.zip u-boot-36af92ba85ad45dfb07f1d17e8b7d6945c1ac0b4.tar.gz u-boot-36af92ba85ad45dfb07f1d17e8b7d6945c1ac0b4.tar.bz2 |
net: phy: Remove non-DM_ETH code
As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/aquantia.c | 2 | ||||
-rw-r--r-- | drivers/net/phy/atheros.c | 2 | ||||
-rw-r--r-- | drivers/net/phy/dp83867.c | 14 | ||||
-rw-r--r-- | drivers/net/phy/dp83869.c | 14 | ||||
-rw-r--r-- | drivers/net/phy/marvell.c | 7 | ||||
-rw-r--r-- | drivers/net/phy/micrel_ksz90x1.c | 18 | ||||
-rw-r--r-- | drivers/net/phy/phy.c | 13 |
7 files changed, 0 insertions, 70 deletions
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c index 79fbc11..8eb6024 100644 --- a/drivers/net/phy/aquantia.c +++ b/drivers/net/phy/aquantia.c @@ -338,7 +338,6 @@ static int aquantia_set_proto(struct phy_device *phydev, static int aquantia_dts_config(struct phy_device *phydev) { -#ifdef CONFIG_DM_ETH ofnode node = phydev->node; u32 prop; u16 reg; @@ -374,7 +373,6 @@ static int aquantia_dts_config(struct phy_device *phydev) (u16)(prop << 1)); } -#endif return 0; } diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c index fa1fe08..c6f9f91 100644 --- a/drivers/net/phy/atheros.c +++ b/drivers/net/phy/atheros.c @@ -191,7 +191,6 @@ static int ar803x_regs_config(struct phy_device *phydev) static int ar803x_of_init(struct phy_device *phydev) { -#if defined(CONFIG_DM_ETH) struct ar803x_priv *priv; ofnode node, vddio_reg_node; u32 strength, freq, min_uV, max_uV; @@ -306,7 +305,6 @@ static int ar803x_of_init(struct phy_device *phydev) debug("%s: flags=%x clk_25m_reg=%04x clk_25m_mask=%04x\n", __func__, priv->flags, priv->clk_25m_reg, priv->clk_25m_mask); -#endif return 0; } diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 3d86263..a45152b 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -144,7 +144,6 @@ static int dp83867_config_port_mirroring(struct phy_device *phydev) return 0; } -#if defined(CONFIG_DM_ETH) /** * dp83867_data_init - Convenience function for setting PHY specific data * @@ -249,19 +248,6 @@ static int dp83867_of_init(struct phy_device *phydev) return 0; } -#else -static int dp83867_of_init(struct phy_device *phydev) -{ - struct dp83867_private *dp83867 = phydev->priv; - - dp83867->rx_id_delay = DP83867_RGMIIDCTL_2_25_NS; - dp83867->tx_id_delay = DP83867_RGMIIDCTL_2_75_NS; - dp83867->fifo_depth = DEFAULT_FIFO_DEPTH; - dp83867->io_impedance = -EINVAL; - - return 0; -} -#endif static int dp83867_config(struct phy_device *phydev) { diff --git a/drivers/net/phy/dp83869.c b/drivers/net/phy/dp83869.c index c946118..23dbf42 100644 --- a/drivers/net/phy/dp83869.c +++ b/drivers/net/phy/dp83869.c @@ -157,7 +157,6 @@ static int dp83869_config_port_mirroring(struct phy_device *phydev) return 0; } -#ifdef CONFIG_DM_ETH static const int dp83869_internal_delay[] = {250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000, 3250, 3500, 3750, 4000}; @@ -269,19 +268,6 @@ static int dp83869_of_init(struct phy_device *phydev) return 0; } -#else -static int dp83869_of_init(struct phy_device *phydev) -{ - struct dp83869_private *dp83869 = phydev->priv; - - dp83869->rx_int_delay = DP83869_RGMIIDCTL_2_25_NS; - dp83869->tx_int_delay = DP83869_RGMIIDCTL_2_75_NS; - dp83869->fifo_depth = DEFAULT_FIFO_DEPTH; - dp83869->io_impedance = -EINVAL; - - return 0; -} -#endif /* CONFIG_OF_MDIO */ static int dp83869_configure_rgmii(struct phy_device *phydev, struct dp83869_private *dp83869) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 212a861..1a25775 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -104,7 +104,6 @@ #define MIIM_88E151x_MODE_SGMII 1 #define MIIM_88E151x_RESET_OFFS 15 -#if IS_ENABLED(CONFIG_DM_ETH) static int marvell_read_page(struct phy_device *phydev) { return phy_read(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE); @@ -179,12 +178,6 @@ static int marvell_of_reg_init(struct phy_device *phydev) err: return marvell_write_page(phydev, saved_page); } -#else -static int marvell_of_reg_init(struct phy_device *phydev) -{ - return 0; -} -#endif /* CONFIG_DM_ETH */ static int m88e1xxx_phy_extread(struct phy_device *phydev, int addr, int devaddr, int regnum) diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c index e5f5782..79ebdb5 100644 --- a/drivers/net/phy/micrel_ksz90x1.c +++ b/drivers/net/phy/micrel_ksz90x1.c @@ -68,7 +68,6 @@ static int ksz90xx_startup(struct phy_device *phydev) } /* Common OF config bits for KSZ9021 and KSZ9031 */ -#ifdef CONFIG_DM_ETH struct ksz90x1_reg_field { const char *name; const u8 size; /* Size of the bitfield, in bits */ @@ -211,23 +210,6 @@ static int ksz9031_center_flp_timing(struct phy_device *phydev) return ret; } -#else /* !CONFIG_DM_ETH */ -static int ksz9021_of_config(struct phy_device *phydev) -{ - return 0; -} - -static int ksz9031_of_config(struct phy_device *phydev) -{ - return 0; -} - -static int ksz9031_center_flp_timing(struct phy_device *phydev) -{ - return 0; -} -#endif - /* * KSZ9021 */ diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 92143cf..80230b9 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -689,9 +689,7 @@ struct phy_device *phy_device_create(struct mii_dev *bus, int addr, dev->link = 0; dev->interface = PHY_INTERFACE_MODE_NA; -#ifdef CONFIG_DM_ETH dev->node = ofnode_null(); -#endif dev->autoneg = AUTONEG_ENABLE; @@ -922,13 +920,8 @@ struct phy_device *phy_find_by_mask(struct mii_dev *bus, uint phy_mask) return get_phy_device_by_mask(bus, phy_mask); } -#ifdef CONFIG_DM_ETH void phy_connect_dev(struct phy_device *phydev, struct udevice *dev, phy_interface_t interface) -#else -void phy_connect_dev(struct phy_device *phydev, struct eth_device *dev, - phy_interface_t interface) -#endif { /* Soft Reset the PHY */ phy_reset(phydev); @@ -1011,15 +1004,9 @@ static struct phy_device *phy_connect_fixed(struct mii_dev *bus, } #endif -#ifdef CONFIG_DM_ETH struct phy_device *phy_connect(struct mii_dev *bus, int addr, struct udevice *dev, phy_interface_t interface) -#else -struct phy_device *phy_connect(struct mii_dev *bus, int addr, - struct eth_device *dev, - phy_interface_t interface) -#endif { struct phy_device *phydev = NULL; uint mask = (addr >= 0) ? (1 << addr) : 0xffffffff; |