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>
Tue, 15 Aug 2023 13:55:00 +0000 (15:55 +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>
target/linux/armsr/image/Makefile
target/linux/armsr/modules.mk

index e5153870d22d73007e53025dca724b4c819d3657..1df9657385dc624eb22a35c0233cdf1a61d59311 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-sfp kmod-atlantic \
-       kmod-bcmgenet
+       kmod-bcmgenet kmod-octeontx2-net
 endef
 TARGET_DEVICES += generic
 
index f570c613cf33788c092a65ef106b318ecb3b3847..4cf3d357d0376085cec56578f50b486995b3ea26 100644 (file)
@@ -269,7 +269,7 @@ $(eval $(call KernelPackage,dwmac-rockchip))
 
 define KernelPackage/thunderx-net
   SUBMENU:=$(NETWORK_DEVICES_MENU)
-  TITLE:=Marvell (Cavium) ThunderX/2 network drivers
+  TITLE:=Marvell (Cavium) Thunder network drivers
   DEPENDS:=@(TARGET_armsr_armv8) +kmod-phylink +kmod-of-mdio
   KCONFIG:=CONFIG_NET_VENDOR_CAVIUM \
     CONFIG_THUNDER_NIC_PF \
@@ -285,6 +285,25 @@ 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 \
+    $(LINUX_DIR)/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.ko
+  AUTOLOAD=$(call AutoLoad,40,rvu_af rvu_mbox rvu_nicpf rvu_nicvf otx2_ptp)
+endef
+$(eval $(call KernelPackage,octeontx2-net))
+
 define KernelPackage/wdt-sp805
   SUBMENU:=$(OTHER_MENU)
   TITLE:=ARM SP805 Watchdog