armvirt: 64: add Marvell (formerly Cavium) ThunderX series network driver
authorMathew McBride <matt@traverse.com.au>
Sat, 11 Feb 2023 03:58:09 +0000 (03:58 +0000)
committerPetr Štetiar <ynezz@true.cz>
Fri, 2 Jun 2023 09:36:29 +0000 (11:36 +0200)
Based on working configuration supplied by Anton Antonov.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
target/linux/armvirt/image/Makefile
target/linux/armvirt/modules.mk

index 7c4ba60b9b0c3a4dc076c4c6df453695575104ad..f1d0acd0138b0f3fb472ccb8ca7401bf302c40ad 100644 (file)
@@ -108,8 +108,8 @@ define Device/generic
   DEVICE_PACKAGES += kmod-amazon-ena kmod-e1000e kmod-vmxnet3 kmod-rtc-rx8025 \
        kmod-i2c-mux-pca954x kmod-gpio-pca953x partx-utils kmod-wdt-sp805 \
        kmod-mvneta kmod-mvpp2 kmod-fsl-dpaa1-net kmod-fsl-dpaa2-net \
-       kmod-fsl-enetc-net kmod-dwmac-imx kmod-fsl-fec kmod-sfp \
-       kmod-phy-aquantia kmod-phy-broadcom kmod-phy-marvell \
+       kmod-fsl-enetc-net kmod-dwmac-imx kmod-fsl-fec kmod-thunderx-net \
+       kmod-phy-aquantia kmod-phy-broadcom kmod-phy-marvell kmod-sfp \
        kmod-phy-marvell-10g kmod-atlantic
 endef
 TARGET_DEVICES += generic
index 1ff523c7bd9b1edf5b6f64b0081f9ee00888dd95..1531e91bde0b07a53958591464fc49e84892f7e4 100644 (file)
@@ -234,6 +234,24 @@ endef
 
 $(eval $(call KernelPackage,dwmac-imx))
 
+define KernelPackage/thunderx-net
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=Marvell (Cavium) ThunderX/2 network drivers
+  DEPENDS:=@(TARGET_armvirt_64) +kmod-phylink +kmod-of-mdio
+  KCONFIG:=CONFIG_NET_VENDOR_CAVIUM \
+    CONFIG_THUNDER_NIC_PF \
+    CONFIG_THUNDER_NIC_VF \
+    CONFIG_THUNDER_NIC_BGX \
+    CONFIG_THUNDER_NIC_RGX
+  FILES=$(LINUX_DIR)/drivers/net/ethernet/cavium/thunder/nicvf.ko \
+    $(LINUX_DIR)/drivers/net/ethernet/cavium/thunder/nicpf.ko \
+    $(LINUX_DIR)/drivers/net/ethernet/cavium/thunder/thunder_xcv.ko \
+    $(LINUX_DIR)/drivers/net/ethernet/cavium/thunder/thunder_bgx.ko
+  AUTOLOAD=$(call AutoLoad,40,nicpf nicvf thunder_xcv thunder_bgx)
+endef
+
+$(eval $(call KernelPackage,thunderx-net))
+
 define KernelPackage/wdt-sp805
   SUBMENU:=$(OTHER_MENU)
   TITLE:=ARM SP805 Watchdog