Hi Jagan,

On Tue, May 23, 2017 at 4:58 AM, Jagan Teki <jagannadh.t...@gmail.com> wrote:

> +#if defined(CONFIG_DM_ETH) && defined(CONFIG_DM_GPIO)
> +static int fec_phy_reset(struct mii_dev *bus)
> +{
> +       struct fec_priv *priv = dev_get_priv((struct udevice *)bus->priv);
> +
> +       if (!dm_gpio_is_valid(&priv->reset_gpio))
> +               return 0;
> +
> +       /* phy reset */
> +       dm_gpio_set_value(&priv->reset_gpio, 0);
> +       udelay(100);
> +       dm_gpio_set_value(&priv->reset_gpio, 1);
> +       udelay(100);

Please don't add a fixed delay here. It would be better to do like in
the kernel where we also have the 'phy-reset-duration' property that
specifies the reset duration.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to