Re: [PATCH] modules: Add kernel module for MV88E6xxx DSA switch

2024-01-31 Thread Linus Walleij
On Wed, Jan 31, 2024 at 1:35 PM Paul D  wrote:

> Is this what we tested on 6846? Or this is what you've been cooking? :)
>
> I'm almost certain it's the latter.

Yeah I have it in my new patch set for the 6846, so we don't
have to unconditionally compile in the mv88e6xxx switch into all
bcm6328 kernels. (Those are footprint-sensitive.)

I updated the initramfs and sysupgrade images on my site especially
for you so you can test it :)

I try to trickle in the required patches a bit at the time.

Yours,
Linus Walleij

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] modules: Add kernel module for MV88E6xxx DSA switch

2024-01-31 Thread Paul D



Is this what we tested on 6846? Or this is what you've been cooking? :)

I'm almost certain it's the latter.

On 2024-01-30 23:33, Linus Walleij wrote:

This adds a kernel module package for the Marvell
MV88E6XXX DSA switch and a separate module package for
the DSA tagger since it can in theory be used by multiple
DSA switches. Enable both DSA and EDSA tags in the
tagger.



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH] modules: Add kernel module for MV88E6xxx DSA switch

2024-01-30 Thread Linus Walleij
This adds a kernel module package for the Marvell
MV88E6XXX DSA switch and a separate module package for
the DSA tagger since it can in theory be used by multiple
DSA switches. Enable both DSA and EDSA tags in the
tagger.

We can't just compile this in because just a few devices
has this DSA, and it depends on e.g. the I2C and SFP
to be loaded as modules first.

We have no examples of DSA switches being packaged as
modules before, all seem to be compiled in, but it
actually works just fine to do this.

Signed-off-by: Linus Walleij 
---
 package/kernel/linux/modules/netdevices.mk | 34 ++
 1 file changed, 34 insertions(+)

diff --git a/package/kernel/linux/modules/netdevices.mk 
b/package/kernel/linux/modules/netdevices.mk
index 63f75e959145..fb6d565a86af 100644
--- a/package/kernel/linux/modules/netdevices.mk
+++ b/package/kernel/linux/modules/netdevices.mk
@@ -390,6 +390,40 @@ endef
 
 $(eval $(call KernelPackage,phy-aquantia))
 
+define KernelPackage/dsa-tag-dsa
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=Marvell DSA type DSA and EDSA taggers
+  KCONFIG:= CONFIG_NET_DSA_TAG_DSA_COMMON \
+   CONFIG_NET_DSA_TAG_DSA \
+   CONFIG_NET_DSA_TAG_EDSA \
+   CONFIG_NET_DSA=y
+  FILES:=$(LINUX_DIR)/net/dsa/tag_dsa.ko
+  AUTOLOAD:=$(call AutoLoad,40,tag_dsa,1)
+endef
+
+define KernelPackage/dsa-tag-dsa/description
+  Kernel modules for Marvell DSA and EDSA tagging
+endef
+
+$(eval $(call KernelPackage,dsa-tag-dsa))
+
+define KernelPackage/dsa-mv88e6xxx
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=Marvell MV88E6XXX DSA Switch
+  DEPENDS:=+kmod-ptp +kmod-phy-marvell +kmod-dsa-tag-dsa
+  KCONFIG:=CONFIG_NET_DSA_MV88E6XXX \
+   CONFIG_NET_DSA_MV88E6XXX_PTP=y \
+   CONFIG_NET_DSA=y
+  FILES:=$(LINUX_DIR)/drivers/net/dsa/mv88e6xxx/mv88e6xxx.ko
+  AUTOLOAD:=$(call AutoLoad,41,mv88e6xxx,1)
+endef
+
+define KernelPackage/dsa-mv88e6xxx/description
+  Kernel modules for MV88E6XXX DSA switches
+endef
+
+$(eval $(call KernelPackage,dsa-mv88e6xxx))
+
 
 define KernelPackage/swconfig
   SUBMENU:=$(NETWORK_DEVICES_MENU)

---
base-commit: 3a073a021286bef3fed0ca7884872c5890420d60
change-id: 20240130-mv88e6xxx-dsa-modules-2ba74a4cf70a

Best regards,
-- 
Linus Walleij 


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel