# Re: \[PATCH -next\] dpaa2-switch: Add depend on FSL\_DPAA2\_ETH to FSL\_DPAA2\_SWITCH

- From: Ioana Ciornei \<ioana.ciornei@nxp.com\>
- Date: 2026-03-04 10:23:43 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/03/3439664
- Thread: https://ratatoskr.run/netdev/2026/03/3436792/t.md

```text
On Tue, Mar 03, 2026 at 01:38:14AM +0000, Cai Xinchen wrote:
> When CONFIG_FSL_DPAA2_ETH=n, dpaa2 cannot be compiled. Thus Add
> depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH in Kconfig

There is no code dependency between the dpaa2-switch driver and the
dpaa2-eth one, just a compile time one dictated by how
freescale/Makefile includes the dpaa2/ folder.

How about we always include the folder and let dpaa2/Makefile handle
what objects to include depending on the individual Kconfig options?
Something like the diff below:

--- a/drivers/net/ethernet/freescale/Makefile
+++ b/drivers/net/ethernet/freescale/Makefile
@@ -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/

And I just realised that commit 84cba72956fd ("dpaa2-switch: integrate
the MAC endpoint support") included dpaa2-mac.o in the driver switch
objects but didn't amend the Kconfig to specify that PCS_LYNX, PHYLINK
and FSL_XGMAC_MDIO should be selected. Could you please also fix that as
a separate patch? Otherwise, I can take care of it.

Thanks!
```
