[PATCH net-next 3/6] net: stmmac: mediatek: rename MT2712 and MT8195 variant methods

Louis-Alexis Eyraud louisalexis.eyraud at collabora.com
Wed Jul 8 05:04:59 PDT 2026


Hi Maxime,

On Tue, 2026-07-07 at 11:05 +0200, Maxime Chevallier wrote:
> 
> 
> On 7/7/26 10:21, Louis-Alexis Eyraud wrote:
> > In preparation of newer SoC support, rename MT2712 and MT8195
> > variant
> > methods and sub functions to more generic names.
> > 
> > Signed-off-by: Louis-Alexis Eyraud
> > <louisalexis.eyraud at collabora.com>
> > ---
> >  .../net/ethernet/stmicro/stmmac/dwmac-mediatek.c   | 32
> > +++++++++++-----------
> >  1 file changed, 16 insertions(+), 16 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> > b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> > index 0cabab4fd89a..28e87990b0a1 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> > @@ -110,7 +110,7 @@ static const char * const mt8195_dwmac_clk_l[]
> > = {
> >  	"axi", "apb", "mac_cg", "mac_main", "ptp_ref"
> >  };
> >  
> > -static int mt2712_set_interface(struct mediatek_dwmac_plat_data
> > *plat,
> > +static int set_phy_interface_v1(struct mediatek_dwmac_plat_data
> > *plat,
> >  				u8 phy_intf_sel)
> 
> What does this naming of "v1 / v2" refer to ?
> 
> I personally don't find it much better than the current one prefixed
> by the SoC
> name. You still end-up using registers that have the "MT8195_" prefix
> in their
> names in the 'v2' variants of these functions, so it still sound SoC-
> family specific :)
> 
I agree.

In a work in progress version of this series, I had renamed all
register definitions as well (to remove the mt8195_ prefix) but dropped
the changes because too much difference for little gain.
I kept this patch but it does not really improve the code.

> I'd say you can keep the original names as-is, or if you really want
> a rename,
> maybe use the mt81xx_ prefix for MT8195 and MT8189 ?
I'll drop this patch in v2 to keep the existing names (and smaller
changes).

Regards,
Louis-Alexis

> Maxime



More information about the Linux-mediatek mailing list