[PATCH v2 1/2] net: brcm: netXtreme driver

Marek Behún kabel at kernel.org
Tue Oct 26 00:22:33 CEST 2021


On Mon, 25 Oct 2021 14:35:20 -0700
Roman Bacik <roman.bacik at broadcom.com> wrote:

> > - you are introducing custom mechanism for setting / getting PHY
> >   parameters, via custom specific env variables, for example in the
> >   set_phy_speed() and set_phy_link() functions, i.e.:
> >         sprintf(name1, "bnxt_eth%u_phy_speed", bp->cardnum);
> >         env_set(name1, name);
> >
> >   The whole point of several people in the past few years was to create
> >   generic mechanisms for such things. We have ethernet PHY DM class,
> >   you should use this. That way you won't need to introduce custom
> >   mechanisms to get the infromation, since there are mii/mdio commands.  
> 
> These are chip internal settings stored internally in NVM. They are
> not modified via mii/mdio.

Ah. Well that also shouldn't use custom commands. Unfortunately U-Boot
does not have a generic nvmem API yet, but I plan to write nvmem API
together with `nvmem` command, which would be generic.

As of now, we have the `mac` and `fuse` commands for this (although
deprecated and will be removed). If you want to write nvmem interface,
you could use the `mac` command. But it will be deprecated once we have
nvmem API, would you be willing to rewrite it then?

Marek


More information about the U-Boot mailing list