net: ethernet: ti: Fix mixed module-builtin object
authorMD Danish Anwar <danishanwar@ti.com>
Wed, 18 Oct 2023 06:49:36 +0000 (12:19 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 19 Oct 2023 10:39:01 +0000 (12:39 +0200)
commita602ee3176a81280b829c9f0cf259450f7982168
tree6cc46033c199c2cf5fcf2960097b83eb9cd3a487
parent9b9ac46c6cb52a2f3f779732d6837ecab1ca78dc
net: ethernet: ti: Fix mixed module-builtin object

With CONFIG_TI_K3_AM65_CPSW_NUSS=y and CONFIG_TI_ICSSG_PRUETH=m,
k3-cppi-desc-pool.o is linked to a module and also to vmlinux even though
the expected CFLAGS are different between builtins and modules.

The build system is complaining about the following:

k3-cppi-desc-pool.o is added to multiple modules: icssg-prueth
ti-am65-cpsw-nuss

Introduce the new module, k3-cppi-desc-pool, to provide the common
functions to ti-am65-cpsw-nuss and icssg-prueth.

Fixes: 128d5874c082 ("net: ti: icssg-prueth: Add ICSSG ethernet driver")
Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Link: https://lore.kernel.org/r/20231018064936.3146846-1-danishanwar@ti.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/ti/Kconfig
drivers/net/ethernet/ti/Makefile
drivers/net/ethernet/ti/k3-cppi-desc-pool.c