diff mbox series

[v4,04/14] net: dwc_eth_qos: Drop unused dm_gpio_free() on STM32

Message ID 20230306145354.7439-4-marex@denx.de
State Accepted
Commit 2e0bade78542998134378ae33c50b054532b70a1
Delegated to: Stefano Babic
Headers show
Series [v4,01/14] clk: imx8mp: Add EQoS MAC clock | expand

Commit Message

Marek Vasut March 6, 2023, 2:53 p.m. UTC
The dm_gpio_free() is never called, because for stm32, the phy_reset_gpio
pointer is never valid. This is because only tegra186 ever claims the
phy_reset_gpio, all other platforms use the PHY framework to reset the
PHY instead. Drop the dm_gpio_free() and dm_gpio_is_valid().

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: "Ariel D'Alessandro" <ariel.dalessandro@collabora.com>
Cc: "NXP i.MX U-Boot Team" <uboot-imx@nxp.com>
Cc: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Sean Anderson <seanga2@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
Cc: u-boot@lists.denx.de
---
V2: - Add RB from Ramon
    - Mark eqos variable in eqos_remove_resources_stm32() with __maybe_unused
V3: No change
V4: No change
---
 drivers/net/dwc_eth_qos.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Stefano Babic March 30, 2023, 3:23 p.m. UTC | #1
> The dm_gpio_free() is never called, because for stm32, the phy_reset_gpio
> pointer is never valid. This is because only tegra186 ever claims the
> phy_reset_gpio, all other platforms use the PHY framework to reset the
> PHY instead. Drop the dm_gpio_free() and dm_gpio_is_valid().
> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
> Signed-off-by: Marek Vasut <marex@denx.de>
Applied to u-boot-imx, next, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index 00690b28ca6..b97b3ea2db6 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -1493,7 +1493,7 @@  static int eqos_remove_resources_tegra186(struct udevice *dev)
 
 static int eqos_remove_resources_stm32(struct udevice *dev)
 {
-	struct eqos_priv *eqos = dev_get_priv(dev);
+	struct eqos_priv * __maybe_unused eqos = dev_get_priv(dev);
 
 	debug("%s(dev=%p):\n", __func__, dev);
 
@@ -1505,9 +1505,6 @@  static int eqos_remove_resources_stm32(struct udevice *dev)
 		clk_free(&eqos->clk_ck);
 #endif
 
-	if (dm_gpio_is_valid(&eqos->phy_reset_gpio))
-		dm_gpio_free(dev, &eqos->phy_reset_gpio);
-
 	debug("%s: OK\n", __func__);
 	return 0;
 }