dpaa2: fix config relation with FSL_DPAA2_SWITCH
Subsystems (3)
v3 cover dpaa2: fix config relation with FSL_DPAA2_SWITCH
When compile FSL_DPAA2_SWITCH, it needs to set CONFIG_FSL_DPAA2_ETH=y, otherwise it cannot be compiled.
And as Ioana Ciornei sugggested, FSL_DPAA2_SWITCH included dpaa2-mac.o in the driver, but it does not select PCS_LYNX, PHYLINK and FSL_XGMAC_MDIO. And FSL_DPAA2_SWITCH depends on FSL_MC_BUS && FSL_MC_DPIO becuase it uses fsl_mc_driver APIs.
v2->v3
Add depends on FSL_MC_BUS && FSL_MC_DPIO for FSL_DPAA2_SWITCH which also satisfy FSL_XGMAC_MDIO's OF requirement.
v1->v2
There is no code dependency between the dpaa2-switch driver and the dpaa2-eth, so use Makefile to control dpaa2-eth instead of using depending on in Kconfig.
And add select PCS_LYNX, PHYLINK and FSL_XGMAC_MDIO for FSL_DPAA2_SWITCH.
Cai Xinchen (2):
dpaa2: add independent dependencies for FSL_DPAA2_SWITCH
dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=n
drivers/net/ethernet/freescale/Makefile | 3 +-- drivers/net/ethernet/freescale/dpaa2/Kconfig | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1
PATCH v3 1/2 dpaa2: add independent dependencies for FSL_DPAA2_SWITCH
Since the commit 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support") included dpaa2-mac.o in the driver, but it didn't select PCS_LYNX, PHYLINK and FSL_XGMAC_MDIO. it will lead to link error, such as
undefined reference to phylink_ethtool_ksettings_set' undefined reference to lynx_pcs_create_fwnode'
And the same reason as the commit d2624e70a2f53 ("dpaa2-eth: select XGMAC_MDIO for MDIO bus support"), enable the FSL_XGMAC_MDIO Kconfig option in order to have MDIO access to internal and external PHYs.
Because dpaa2-switch uses fsl_mc_driver APIs, add depends on FSL_MC_BUS && FSL_MC_DPIO as FSL_DPAA2_SWITCH do.
FSL_XGMAC_MDIO and FSL_MC_BUS depend on OF, thus the dependence of FSL_MC_BUS can satisfy FSL_XGMAC_MDIO's OF requirement.
--- drivers/net/ethernet/freescale/dpaa2/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/freescale/dpaa2/Kconfig +4 -0
@@ -34,6 +34,10 @@ config FSL_DPAA2_SWITCH tristate "Freescale DPAA2 Ethernet Switch" depends on BRIDGE || BRIDGE=n depends on NET_SWITCHDEV + depends on FSL_MC_BUS && FSL_MC_DPIO + select PHYLINK + select PCS_LYNX + select FSL_XGMAC_MDIO help Driver for Freescale DPAA2 Ethernet Switch. This driver manages switch objects discovered on the Freeescale MC bus.
Signature · 1 line
2.34.1
PATCH v3 2/2 dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=n
In reply to Cai XinchenCONFIG_FSL_DPAA2_ETH and CONFIG_FSL_DPAA2_SWITCH are not associated, but the compilation of FSL_DPAA2_SWITCH depends on the compilation of the dpaa2 folder. The files controlled by CONFIG_FSL_DPAA2_SWITCH in the dpaa2 folder are not controlled by CONFIG_FSL_DPAA2_ETH, except for the files controlled by CONFIG_FSL_DPAA2_SWITCH. Therefore, removing the restriction will not affect the compilation of the files in the directory.
--- drivers/net/ethernet/freescale/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/freescale/Makefile +1 -2
@@ -22,6 +22,5 @@ ucc_geth_driver-objs := ucc_geth.o ucc_geth_ethtool.o obj-$(CONFIG_FSL_FMAN) += fman/ obj-$(CONFIG_FSL_DPAA_ETH) += dpaa/ -obj-$(CONFIG_FSL_DPAA2_ETH) += dpaa2/ - +obj-y += dpaa2/ obj-y += enetc/
Signature · 1 line
2.34.1
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Thu, 12 Mar 2026 06:59:05 +0000 you wrote:
When compile
FSL_DPAA2_SWITCH, it needs to setCONFIG_FSL_DPAA2_ETH=y, otherwise it cannot be compiled.
And as Ioana Ciornei sugggested,FSL_DPAA2_SWITCHincluded dpaa2-mac.o in the driver, but it does not selectPCS_LYNX, PHYLINK andFSL_XGMAC_MDIO. AndFSL_DPAA2_SWITCHdepends onFSL_MC_BUS&&FSL_MC_DPIObecuase it usesfsl_mc_driverAPIs.[...]
Here is the summary with links:
- [v3,-next,1/2] dpaa2: add independent dependencies for FSL_DPAA2_SWITCH
https://git.kernel.org/netdev/net-next/c/12589892f41c - [v3,-next,2/2] dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=n https://git.kernel.org/netdev/net-next/c/97daf00745f7
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html