[PATCH v2 2/4] net: ravb: Add optional reset deassertion
Marek Vasut
marek.vasut at mailbox.org
Mon Mar 24 02:08:13 CET 2025
On 3/19/25 1:03 PM, Paul Barker wrote:
[...]
> static int ravb_probe(struct udevice *dev)
> {
> + struct ravb_device_ops *device_ops =
> + (struct ravb_device_ops *)dev_get_driver_data(dev);
> struct eth_pdata *pdata = dev_get_plat(dev);
> struct ravb_priv *eth = dev_get_priv(dev);
> struct mii_dev *mdiodev;
> @@ -648,16 +653,32 @@ static int ravb_probe(struct udevice *dev)
> if (ret)
> goto err_clk_enable;
>
> + if (device_ops->has_reset) {
> + ret = reset_get_by_index(dev, 0, ð->rst);
Can devm_reset_control_get_optional() maybe be used here instead of the
flag ?
> + if (ret < 0)
> + goto err_clk_enable;
> +
> + ret = reset_deassert(ð->rst);
> + if (ret < 0)
> + goto err_reset_deassert;
> + }
[...]
More information about the U-Boot
mailing list