armsr: add Marvell (Cavium) ThunderX2 network driver
authorMathew McBride <matt@traverse.com.au>
Wed, 9 Aug 2023 06:36:39 +0000 (06:36 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 19 Aug 2023 13:11:55 +0000 (15:11 +0200)
The initial armv8 module incorrectly labelled the Thunder(v1) as
supporting the ThunderX2, when they have different drivers.

Add kmod-octeon-tx2 to support the newer devices.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit 7c5bdff9c472a3f008ac15cc1ccb81cd23b20e1f)

target/linux/armsr/image/Makefile
target/linux/armsr/modules.mk

index 9c33fd898ddada15e5457b32051aa778756b92a0..2548f403306a8d4dd8bf13563ee1b7e90aa65c09 100644 (file)
@@ -112,7 +112,7 @@ define Device/generic
        kmod-fsl-enetc-net kmod-dwmac-imx kmod-fsl-fec kmod-thunderx-net \
        kmod-dwmac-rockchip kmod-dwmac-sun8i kmod-phy-aquantia kmod-phy-broadcom \
        kmod-phy-marvell kmod-phy-marvell-10g kmod-atlantic \
-       kmod-bcmgenet
+       kmod-bcmgenet kmod-octeontx2-net
 endef
 TARGET_DEVICES += generic
 
index 6e3450bf886574434a5d9e5ddddae73f37361275..96f03470fb021f92af9dffa3ca8de320d024e05e 100644 (file)
@@ -268,8 +268,8 @@ $(eval $(call KernelPackage,dwmac-rockchip))
 
 define KernelPackage/thunderx-net
   SUBMENU:=$(NETWORK_DEVICES_MENU)
-  TITLE:=Marvell (Cavium) ThunderX/2 network drivers
-  DEPENDS:=@(TARGET_armsr_armv8) +kmod-phylink
+  TITLE:=Marvell (Cavium) Thunder network drivers
+  DEPENDS:=@(TARGET_armsr_armv8) +kmod-phylink +kmod-of-mdio
   KCONFIG:=CONFIG_NET_VENDOR_CAVIUM \
     CONFIG_THUNDER_NIC_PF \
     CONFIG_THUNDER_NIC_VF \
@@ -284,6 +284,24 @@ endef
 
 $(eval $(call KernelPackage,thunderx-net))
 
+define KernelPackage/octeontx2-net
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=Marvell (Cavium) ThunderX2 network drivers
+  DEPENDS:=@(TARGET_armsr_armv8) +kmod-phylink +kmod-of-mdio +kmod-macsec \
+    +kmod-ptp
+  KCONFIG:=CONFIG_OCTEONTX2_MBOX \
+    CONFIG_OCTEONTX2_AF \
+    CONFIG_OCTEONTX2_PF \
+    CONFIG_OCTEONTX2_VF \
+    CONFIG_NDC_DIS_DYNAMIC_CACHING=n
+  FILES=$(LINUX_DIR)/drivers/net/ethernet/marvell/octeontx2/af/rvu_mbox.ko \
+    $(LINUX_DIR)/drivers/net/ethernet/marvell/octeontx2/af/rvu_af.ko \
+    $(LINUX_DIR)/drivers/net/ethernet/marvell/octeontx2/nic/rvu_nicpf.ko \
+    $(LINUX_DIR)/drivers/net/ethernet/marvell/octeontx2/nic/rvu_nicvf.ko
+  AUTOLOAD=$(call AutoLoad,40,rvu_af rvu_mbox rvu_nicpf rvu_nicvf)
+endef
+$(eval $(call KernelPackage,octeontx2-net))
+
 define KernelPackage/wdt-sp805
   SUBMENU:=$(OTHER_MENU)
   TITLE:=ARM SP805 Watchdog