[PATCH u-boot-marvell 16/19] net: mvneta: Write PHY address just before enabling HW polling
Stefan Roese
sr at denx.de
Mon May 2 09:03:02 CEST 2022
On 27.04.22 12:41, Marek Behún wrote:
> From: Marek Behún <marek.behun at nic.cz>
>
> Write PHY address just before enabling HW polling of the PHY.
>
> Signed-off-by: Marek Behún <marek.behun at nic.cz>
Reviewed-by: Stefan Roese <sr at denx.de>
Thanks,
Stefan
> ---
> drivers/net/mvneta.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
> index 5b1c4fe5fc..4917857681 100644
> --- a/drivers/net/mvneta.c
> +++ b/drivers/net/mvneta.c
> @@ -814,6 +814,8 @@ static void mvneta_defaults_set(struct mvneta_port *pp)
>
> /* Enable PHY polling in hardware if not in fixed-link mode */
> if (!pp->fixed_link) {
> + mvreg_write(pp, MVNETA_PHY_ADDR, pp->phydev->addr);
> +
> val = mvreg_read(pp, MVNETA_UNIT_CONTROL);
> val |= MVNETA_PHY_POLLING_ENABLE;
> mvreg_write(pp, MVNETA_UNIT_CONTROL, val);
> @@ -1431,10 +1433,6 @@ static int mvneta_start(struct udevice *dev)
>
> pp->fixed_link = phydev->phy_id == PHY_FIXED_ID;
>
> - /* Set PHY address in case we will enable HW polling */
> - if (!pp->fixed_link)
> - mvreg_write(pp, MVNETA_PHY_ADDR, phydev->addr);
> -
> pp->phydev = phydev;
> phy_config(phydev);
> phy_startup(phydev);
Viele Grüße,
Stefan Roese
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de
More information about the U-Boot
mailing list