net: stmmac: move initialisation of clk_csr to stmmac_plat_dat_alloc()

Move the default initialisation of plat_dat->clk_csr to
stmmac_plat_dat_alloc().

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vJvj0-0000000EVjb-1jDh@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Russell King (Oracle)
2025-11-14 15:28:34 +00:00
committed by Jakub Kicinski
parent 99e6ddaabd
commit ae4f29712b
2 changed files with 2 additions and 5 deletions

View File

@@ -7565,8 +7565,10 @@ struct plat_stmmacenet_data *stmmac_plat_dat_alloc(struct device *dev)
/* Set the defaults:
* - phy autodetection
* - determine GMII_Address CR field from CSR clock
*/
plat_dat->phy_addr = -1;
plat_dat->clk_csr = -1;
return plat_dat;
}

View File

@@ -480,11 +480,6 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
plat->bus_id = ++bus_id;
}
/* Default to get clk_csr from stmmac_clk_csr_set(),
* or get clk_csr from device tree.
*/
plat->clk_csr = -1;
if (of_property_read_u32(np, "snps,clk-csr", &plat->clk_csr))
of_property_read_u32(np, "clk_csr", &plat->clk_csr);