Re: [PATCH net-next 1/4] net: stmmac: socfpga: Agilex5 EMAC platform configuration

From: Russell King (Oracle)

Date: Wed Oct 29 2025 - 12:15:03 EST


On Wed, Oct 29, 2025 at 04:06:13PM +0800, Rohan G Thomas via B4 Relay wrote:
> +static void socfpga_common_plat_dat(struct socfpga_dwmac *dwmac)
> +{
> + struct plat_stmmacenet_data *plat_dat = dwmac->plat_dat;
> +
> + plat_dat->bsp_priv = dwmac;

Surely this is something which is always done? What's the point in
moving this to a function that always needs to be called from the
implementation specific setup_plat_dat() method?

> + plat_dat->fix_mac_speed = socfpga_dwmac_fix_mac_speed;
> + plat_dat->init = socfpga_dwmac_init;
> + plat_dat->pcs_init = socfpga_dwmac_pcs_init;
> + plat_dat->pcs_exit = socfpga_dwmac_pcs_exit;
> + plat_dat->select_pcs = socfpga_dwmac_select_pcs;

>From what I can see in your patch series, these are never changed.
So, I question the value of having this "common_plat_dat"
initialisation function. Why not leave this code in
socfpga_dwmac_probe(), and just move the initialisation of
plat_dat->core_type and plat_dat->riwt_off ?

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!