diff options
| author | 2025-11-14 15:28:34 +0000 | |
|---|---|---|
| committer | 2025-11-17 19:47:57 -0800 | |
| commit | ae4f29712bf3468111b9ca65b6ecd94c062cb98f (patch) | |
| tree | e306bf986a5da5fb083395651b263d851e294fb0 | |
| parent | net: stmmac: move initialisation of phy_addr to stmmac_plat_dat_alloc() (diff) | |
| download | wireguard-linux-ae4f29712bf3468111b9ca65b6ecd94c062cb98f.tar.xz wireguard-linux-ae4f29712bf3468111b9ca65b6ecd94c062cb98f.zip | |
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>
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 1851f7d0702d..a36e8a90fcaa 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -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; } diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 745032fd46ce..fe3d95274fd6 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -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); |
