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)
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;
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;
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;
}