[openwrt/openwrt] ixp4xx: Break out mv88e6060 DSA switch to package

LEDE Commits lede-commits at lists.infradead.org
Sat Jan 4 10:45:05 PST 2025


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/e80b7a63f18120620a534db598dd0d96df38a5e1

commit e80b7a63f18120620a534db598dd0d96df38a5e1
Author: Linus Walleij <linus.walleij at linaro.org>
AuthorDate: Sat Dec 28 00:13:37 2024 +0100

    ixp4xx: Break out mv88e6060 DSA switch to package
    
    Just one of the devices uses the Marvell MV88E6060 DSA
    switch so break this out from the generic kernel config
    and into a package selected only by that single device
    and probed at boot instead.
    
    The big win is from being able to drop the dsa_core
    (~600KB) kernel module out of the common kernel on
    devices with no DSA switch.
    
    Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
    (cherry picked from commit 2456a2fd7f72d6afcee4ac9c2eccb312d0b1d36d)
---
 package/kernel/linux/modules/netdevices.mk | 17 +++++++++++++++++
 target/linux/ixp4xx/config-6.6             |  3 ---
 target/linux/ixp4xx/image/Makefile         |  2 +-
 3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk
index ee9654761b..247f3782d5 100644
--- a/package/kernel/linux/modules/netdevices.mk
+++ b/package/kernel/linux/modules/netdevices.mk
@@ -575,6 +575,23 @@ endef
 
 $(eval $(call KernelPackage,dsa-b53-mdio))
 
+define KernelPackage/dsa-mv88e6060
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=Marvell MV88E6060 DSA Switch
+  DEPENDS:=+kmod-dsa +kmod-phy-marvell
+  KCONFIG:=CONFIG_NET_DSA_TAG_TRAILER \
+  CONFIG_NET_DSA_MV88E6060
+  FILES:= \
+  $(LINUX_DIR)/drivers/net/dsa/mv88e6060.ko \
+  $(LINUX_DIR)/net/dsa/tag_trailer.ko
+  AUTOLOAD:=$(call AutoLoad,41,mv88e6060,1)
+endef
+
+define KernelPackage/dsa-mv88e6060/description
+  Kernel modules for MV88E6060 DSA switches
+endef
+
+$(eval $(call KernelPackage,dsa-mv88e6060))
 
 define KernelPackage/dsa-tag-dsa
   SUBMENU:=$(NETWORK_DEVICES_MENU)
diff --git a/target/linux/ixp4xx/config-6.6 b/target/linux/ixp4xx/config-6.6
index 84a72c8d5c..c0211c940b 100644
--- a/target/linux/ixp4xx/config-6.6
+++ b/target/linux/ixp4xx/config-6.6
@@ -168,9 +168,6 @@ CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_KUSER_HELPERS=y
 CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NET_DEVLINK=y
-CONFIG_NET_DSA=y
-CONFIG_NET_DSA_MV88E6060=y
-CONFIG_NET_DSA_TAG_TRAILER=y
 CONFIG_NET_EGRESS=y
 CONFIG_NET_INGRESS=y
 CONFIG_NET_PTP_CLASSIFY=y
diff --git a/target/linux/ixp4xx/image/Makefile b/target/linux/ixp4xx/image/Makefile
index ace533e50f..c33eddee8a 100644
--- a/target/linux/ixp4xx/image/Makefile
+++ b/target/linux/ixp4xx/image/Makefile
@@ -128,7 +128,7 @@ define Device/usrobotics_usr8200
 	DEVICE_VENDOR := USRobotics
 	DEVICE_MODEL := USR8200
 	# USB2 is compiled in and needs no package
-	DEVICE_PACKAGES := ixp4xx-microcode-ethernet kmod-rtc-r7301 kmod-firewire kmod-firewire-ohci
+	DEVICE_PACKAGES := ixp4xx-microcode-ethernet kmod-rtc-r7301 kmod-firewire kmod-firewire-ohci kmod-dsa-mv88e6060
 	DEVICE_DTS := intel-ixp42x-usrobotics-usr8200
 	KERNEL := kernel-bin | append-dtb
 	IMAGES := kernel.bin rootfs.bin




More information about the lede-commits mailing list