net: stmmac: Make stmmac_xpcs_setup() generic to all PCS devices
authorSerge Semin <fancer.lancer@gmail.com>
Mon, 13 May 2024 07:25:14 +0000 (09:25 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 14 May 2024 00:19:59 +0000 (17:19 -0700)
commitf9cdff1bdacc947bcd182ea69d94b9f5b32ff328
treef5a886972d04c15b8e405964d31463dedea88027
parentd5c50937d50f396ef97817e30361827ac5b166c2
net: stmmac: Make stmmac_xpcs_setup() generic to all PCS devices

A pcs_init() callback will be introduced to stmmac in a future patch. This
new function will be called during the hardware initialization phase.
Instead of separately initializing XPCS and PCS components, let's group all
PCS-related hardware initialization logic in the current
stmmac_xpcs_setup() function.

Rename stmmac_xpcs_setup() to stmmac_pcs_setup() and move the conditional
call to stmmac_xpcs_setup() inside the function itself.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Co-developed-by: Romain Gantois <romain.gantois@bootlin.com>
Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Hariprasad Kelam <hkelam@marvell.com>
Link: https://lore.kernel.org/r/20240513-rzn1-gmac1-v7-3-6acf58b5440d@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c