mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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:
committed by
Jakub Kicinski
parent
99e6ddaabd
commit
ae4f29712b
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user