diff options
author | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2023-05-31 00:51:29 +0200 |
---|---|---|
committer | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2023-06-10 13:34:05 +0200 |
commit | 92c312c734f5193205dd170a01ae4192f67a2ee5 (patch) | |
tree | 7047aa68bd41b0da58ad60c46069e40ff682063f /drivers/net | |
parent | 5c80edb26421e2cbe70b4a98274a1c0877b2d137 (diff) | |
download | u-boot-92c312c734f5193205dd170a01ae4192f67a2ee5.tar.gz u-boot-92c312c734f5193205dd170a01ae4192f67a2ee5.tar.bz2 u-boot-92c312c734f5193205dd170a01ae4192f67a2ee5.zip |
net: sh_eth: Drop reset GPIO handling in favor of common code
The common code is now capable of handling reset GPIO associated
with PHY. Drop the local ad-hoc code in favor of common code.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/Kconfig | 1 | ||||
-rw-r--r-- | drivers/net/sh_eth.c | 17 |
2 files changed, 1 insertions, 17 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 48f9efcc94..7d482cb774 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -695,6 +695,7 @@ config SUN8I_EMAC config SH_ETHER bool "Renesas SH Ethernet MAC" select PHYLIB + select PHY_ETHERNET_ID help This driver supports the Ethernet for Renesas SH and ARM SoCs. diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 14f7fd1bcc..95042daade 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -530,7 +530,6 @@ struct sh_ether_priv { struct mii_dev *bus; phys_addr_t iobase; struct clk clk; - struct gpio_desc reset_gpio; }; static int sh_ether_send(struct udevice *dev, void *packet, int len) @@ -650,7 +649,6 @@ static int sh_ether_probe(struct udevice *udev) struct eth_pdata *pdata = dev_get_plat(udev); struct sh_ether_priv *priv = dev_get_priv(udev); struct sh_eth_dev *eth = &priv->shdev; - struct ofnode_phandle_args phandle_args; struct mii_dev *mdiodev; int ret; @@ -661,18 +659,6 @@ static int sh_ether_probe(struct udevice *udev) if (ret < 0) return ret; #endif - - ret = dev_read_phandle_with_args(udev, "phy-handle", NULL, 0, 0, &phandle_args); - if (!ret) { - gpio_request_by_name_nodev(phandle_args.node, "reset-gpios", 0, - &priv->reset_gpio, GPIOD_IS_OUT); - } - - if (!dm_gpio_is_valid(&priv->reset_gpio)) { - gpio_request_by_name(udev, "reset-gpios", 0, &priv->reset_gpio, - GPIOD_IS_OUT); - } - mdiodev = mdio_alloc(); if (!mdiodev) { ret = -ENOMEM; @@ -735,9 +721,6 @@ static int sh_ether_remove(struct udevice *udev) mdio_unregister(priv->bus); mdio_free(priv->bus); - if (dm_gpio_is_valid(&priv->reset_gpio)) - dm_gpio_free(udev, &priv->reset_gpio); - return 0; } |