[PATCH v2 1/2] mvebu: Switch to use a module for mv88e6xxx
Linus Walleij
linus.walleij at linaro.org
Sun Jan 12 15:16:52 PST 2025
It's possible to add the driver for the Marvell MV88E6xxx DSA
switches using a module package rather than to compile it into
the kernel. For affected devices this saves a bit of space,
typically the DSA core is 600 KB so this and some more is saved
for devices with no DSA switch.
When adding the packages I went over both the upstream DTS files
and the OpenWrt-specific DTS files and used grep 'marvell,mv88e6'
to find the devices using these switches.
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
target/linux/mvebu/config-6.6 | 5 -----
target/linux/mvebu/image/cortexa53.mk | 5 +++--
target/linux/mvebu/image/cortexa72.mk | 5 +++--
target/linux/mvebu/image/cortexa9.mk | 18 ++++++++++--------
4 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/target/linux/mvebu/config-6.6 b/target/linux/mvebu/config-6.6
index bb29d80c5cf2f17048e508fa8a0dca24786888c8..2881dd5ca26171123e350d7c67089045b3752e3a 100644
--- a/target/linux/mvebu/config-6.6
+++ b/target/linux/mvebu/config-6.6
@@ -288,11 +288,6 @@ CONFIG_MV_XOR=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEON=y
CONFIG_NET_DEVLINK=y
-CONFIG_NET_DSA=y
-CONFIG_NET_DSA_MV88E6XXX=y
-CONFIG_NET_DSA_TAG_DSA=y
-CONFIG_NET_DSA_TAG_DSA_COMMON=y
-CONFIG_NET_DSA_TAG_EDSA=y
CONFIG_NET_FLOW_LIMIT=y
CONFIG_NET_SELFTESTS=y
CONFIG_NET_SWITCHDEV=y
diff --git a/target/linux/mvebu/image/cortexa53.mk b/target/linux/mvebu/image/cortexa53.mk
index 2a3b5ee11ed40fbae980aee4322b0f3018199f6a..ee98fd5499d4581247ca3f710d5d904f8b21663c 100644
--- a/target/linux/mvebu/image/cortexa53.mk
+++ b/target/linux/mvebu/image/cortexa53.mk
@@ -2,6 +2,7 @@ define Device/glinet_gl-mv1000
$(call Device/Default-arm64)
DEVICE_VENDOR := GL.iNet
DEVICE_MODEL := GL-MV1000
+ DEVICE_PACKAGES += kmod-dsa-mv88e6xxx
SOC := armada-3720
BOOT_SCRIPT := gl-mv1000
endef
@@ -38,7 +39,7 @@ define Device/globalscale_espressobin-ultra
DEVICE_VENDOR := Marvell
DEVICE_MODEL := ESPRESSObin
DEVICE_VARIANT := Ultra
- DEVICE_PACKAGES += kmod-i2c-pxa kmod-rtc-pcf8563
+ DEVICE_PACKAGES += kmod-i2c-pxa kmod-rtc-pcf8563 kmod-dsa-mv88e6xxx
SOC := armada-3720
BOOT_SCRIPT := espressobin
endef
@@ -86,7 +87,7 @@ define Device/methode_udpu
KERNEL_LOADADDR := 0x00800000
KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
KERNEL_INITRAMFS_SUFFIX := .itb
- DEVICE_PACKAGES += f2fs-tools fdisk kmod-i2c-pxa kmod-hwmon-lm75
+ DEVICE_PACKAGES += f2fs-tools fdisk kmod-i2c-pxa kmod-hwmon-lm75 kmod-dsa-mv88e6xxx
DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(2)
IMAGES := firmware.tgz
IMAGE/firmware.tgz := boot-scr | boot-img-ext4 | uDPU-firmware | append-metadata
diff --git a/target/linux/mvebu/image/cortexa72.mk b/target/linux/mvebu/image/cortexa72.mk
index 48919b7f7104e3ea5a214221f371a3d323abdaae..f832c7c07626c47e9a33213af205fa1419b02e25 100644
--- a/target/linux/mvebu/image/cortexa72.mk
+++ b/target/linux/mvebu/image/cortexa72.mk
@@ -15,6 +15,7 @@ define Device/globalscale_mochabin
$(call Device/Default-arm64)
DEVICE_VENDOR := Globalscale
DEVICE_MODEL := MOCHAbin
+ DEVICE_PACKAGES += kmod-dsa-mv88e6xxx
SOC := armada-7040
endef
TARGET_DEVICES += globalscale_mochabin
@@ -74,7 +75,7 @@ define Device/mikrotik_rb5009
DEVICE_MODEL := RB5009
SOC := armada-7040
KERNEL_LOADADDR := 0x22000000
- DEVICE_PACKAGES += kmod-i2c-gpio yafut
+ DEVICE_PACKAGES += kmod-i2c-gpio yafut kmod-dsa-mv88e6xxx
endef
TARGET_DEVICES += mikrotik_rb5009
@@ -112,7 +113,7 @@ define Device/solidrun_clearfog-pro
SOC := cn9130
DEVICE_VENDOR := SolidRun
DEVICE_MODEL := ClearFog Pro
- DEVICE_PACKAGES += kmod-i2c-mux-pca954x
+ DEVICE_PACKAGES += kmod-i2c-mux-pca954x kmod-dsa-mv88e6xxx
BOOT_SCRIPT := clearfog-pro
endef
TARGET_DEVICES += solidrun_clearfog-pro
diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk
index 4a41f2c1029c33934c05c55cc3deec68b21d2734..1118cf5b70d1f863216b0e7116565a57fce1ffe9 100644
--- a/target/linux/mvebu/image/cortexa9.mk
+++ b/target/linux/mvebu/image/cortexa9.mk
@@ -108,7 +108,7 @@ define Device/cznic_turris-omnia
wpad-basic-mbedtls kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \
kmod-mt7915-firmware partx-utils kmod-i2c-mux-pca954x kmod-leds-turris-omnia \
kmod-turris-omnia-mcu kmod-gpio-button-hotplug omnia-eeprom omnia-mcu-firmware \
- omnia-mcutool
+ omnia-mcutool kmod-dsa-mv88e6xxx
IMAGES := sysupgrade.img.gz
IMAGE/sysupgrade.img.gz := boot-scr | boot-img | sdcard-img | gzip | append-metadata
SUPPORTED_DEVICES += armada-385-turris-omnia
@@ -123,7 +123,7 @@ define Device/fortinet
KERNEL_SIZE := 6144k
IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | \
sysupgrade-tar rootfs=$$$$@ | append-metadata
- DEVICE_PACKAGES := kmod-hwmon-nct7802
+ DEVICE_PACKAGES := kmod-hwmon-nct7802 kmod-dsa-mv88e6xxx
endef
define Device/fortinet_fg-30e
@@ -202,7 +202,7 @@ define Device/iij_sa-w2
IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
append-rootfs | pad-rootfs | check-size | append-metadata
DEVICE_PACKAGES := kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \
- wpad-basic-mbedtls
+ wpad-basic-mbedtls kmod-dsa-mv88e6xxx
endef
TARGET_DEVICES += iij_sa-w2
@@ -251,7 +251,7 @@ define Device/linksys_wrt1200ac
DEVICE_ALT0_VENDOR := Linksys
DEVICE_ALT0_MODEL := Caiman
DEVICE_DTS := armada-385-linksys-caiman
- DEVICE_PACKAGES += mwlwifi-firmware-88w8864
+ DEVICE_PACKAGES += mwlwifi-firmware-88w8864 kmod-dsa-mv88e6xxx
SUPPORTED_DEVICES += armada-385-linksys-caiman linksys,caiman
endef
TARGET_DEVICES += linksys_wrt1200ac
@@ -267,7 +267,7 @@ define Device/linksys_wrt1900acs
DEVICE_ALT1_VENDOR := Linksys
DEVICE_ALT1_MODEL := Shelby
DEVICE_DTS := armada-385-linksys-shelby
- DEVICE_PACKAGES += mwlwifi-firmware-88w8864
+ DEVICE_PACKAGES += mwlwifi-firmware-88w8864 kmod-dsa-mv88e6xxx
SUPPORTED_DEVICES += armada-385-linksys-shelby linksys,shelby
endef
TARGET_DEVICES += linksys_wrt1900acs
@@ -280,7 +280,7 @@ define Device/linksys_wrt1900ac-v1
DEVICE_ALT0_VENDOR := Linksys
DEVICE_ALT0_MODEL := Mamba
DEVICE_DTS := armada-xp-linksys-mamba
- DEVICE_PACKAGES += mwlwifi-firmware-88w8864
+ DEVICE_PACKAGES += mwlwifi-firmware-88w8864 kmod-dsa-mv88e6xxx
KERNEL_SIZE := 4096k
SUPPORTED_DEVICES += armada-xp-linksys-mamba linksys,mamba
endef
@@ -294,7 +294,7 @@ define Device/linksys_wrt1900ac-v2
DEVICE_ALT0_VENDOR := Linksys
DEVICE_ALT0_MODEL := Cobra
DEVICE_DTS := armada-385-linksys-cobra
- DEVICE_PACKAGES += mwlwifi-firmware-88w8864
+ DEVICE_PACKAGES += mwlwifi-firmware-88w8864 kmod-dsa-mv88e6xxx
SUPPORTED_DEVICES += armada-385-linksys-cobra linksys,cobra
endef
TARGET_DEVICES += linksys_wrt1900ac-v2
@@ -306,7 +306,8 @@ define Device/linksys_wrt3200acm
DEVICE_ALT0_VENDOR := Linksys
DEVICE_ALT0_MODEL := Rango
DEVICE_DTS := armada-385-linksys-rango
- DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964
+ DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964 \
+ kmod-dsa-mv88e6xxx
SUPPORTED_DEVICES += armada-385-linksys-rango linksys,rango
endef
TARGET_DEVICES += linksys_wrt3200acm
@@ -339,6 +340,7 @@ define Device/marvell_a370-rd
DEVICE_VENDOR := Marvell
DEVICE_MODEL := Armada 370 RD (RD-88F6710-A1)
DEVICE_DTS := armada-370-rd
+ DEVICE_PACKAGES += kmod-dsa-mv88e6xxx
SUPPORTED_DEVICES += armada-370-rd
endef
TARGET_DEVICES += marvell_a370-rd
--
2.47.1
More information about the openwrt-devel
mailing list