Skip to contentSkip to conversation

dpaa2: fix config relation with FSL_DPAA2_SWITCH

PATCH Applied Cai Xinchen 2 participants 4 messages Mar 12 – Mar 14

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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.

Fixes 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support")
---
 drivers/net/ethernet/freescale/dpaa2/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ethernet/freescale/dpaa2/Kconfig +4 -0
index d029b69c3f18..36280e5d99e1 100644
@@ -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
#2 lore raw

PATCH v3 2/2 dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=n

In reply to Cai Xinchen

CONFIG_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.

Fixes f48298d3fbfaa ("staging: dpaa2-switch: move the driver out of staging")
---
 drivers/net/ethernet/freescale/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/freescale/Makefile +1 -2
index de7b31842233..d0a259e47960 100644
@@ -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
#3 lore raw
In reply to Cai Xinchen
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 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.

[...]

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