mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 19:47:08 +02:00
net: stmmac: dwmac-socfpga: Use the socfpga_sgmii_config() helper
Use the existing socfpga_sgmii_config() helper in socfpga_dwmac_fix_mac_speed(), instead of re-coding the register access. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/20260324092102.687082-3-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
845a044111
commit
a7be7cc124
|
|
@ -95,8 +95,7 @@ static void socfpga_dwmac_fix_mac_speed(void *bsp_priv,
|
|||
u32 val;
|
||||
|
||||
if (sgmii_adapter_base)
|
||||
writew(SGMII_ADAPTER_DISABLE,
|
||||
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
|
||||
socfpga_sgmii_config(dwmac, false);
|
||||
|
||||
if (splitter_base) {
|
||||
val = readl(splitter_base + EMAC_SPLITTER_CTRL_REG);
|
||||
|
|
@ -121,8 +120,7 @@ static void socfpga_dwmac_fix_mac_speed(void *bsp_priv,
|
|||
if ((priv->plat->phy_interface == PHY_INTERFACE_MODE_SGMII ||
|
||||
priv->plat->phy_interface == PHY_INTERFACE_MODE_1000BASEX) &&
|
||||
sgmii_adapter_base)
|
||||
writew(SGMII_ADAPTER_ENABLE,
|
||||
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
|
||||
socfpga_sgmii_config(dwmac, true);
|
||||
}
|
||||
|
||||
static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *dev)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user