From: Zheng Bao Date: Tue, 13 Apr 2021 04:46:17 +0000 (+0800) Subject: x86/64: Add support for AMD SOC Ethernet controller X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1c4cd71109d1cec01cf033bc6e26e050726928ea;p=openwrt%2Fstaging%2Fynezz.git x86/64: Add support for AMD SOC Ethernet controller This feature is already supported in kernel. Add definition and configuration in Makefile of OpenWRT. It is tested on board Dibbler with processor V1605B. Dmesg is as below. -------------------------------------------- [ 0.317122] smpboot: CPU0: AMD Ryzen Embedded V1605B with Radeon Vega Gfx (family: 0x17, model: 0x11, stepping: 0x0) [ 8.227270] libphy: amd-xgbe-mii: probed [ 8.228189] amd-xgbe 0000:02:00.1 eth0: net device enabled [ 8.228999] libphy: amd-xgbe-mii: probed [ 8.229921] amd-xgbe 0000:02:00.2 eth1: net device enabled ..... [ 11.760869] br-lan: port 1(eth0) entered blocking state [ 11.761365] br-lan: port 1(eth0) entered disabled state [ 11.762019] device eth0 entered promiscuous mode [ 11.785285] 8021q: adding VLAN 0 to HW filter on device eth1 [ 16.881431] amd-xgbe 0000:02:00.1 eth0: Link is Up - 1Gbps/Full - flow control off [ 16.882108] br-lan: port 1(eth0) entered blocking state [ 16.882583] br-lan: port 1(eth0) entered forwarding state [ 16.883249] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready ----------------------------------------------- Signed-off-by: Zheng Bao --- diff --git a/target/linux/x86/image/64.mk b/target/linux/x86/image/64.mk index edbf503052..9c9decbf79 100644 --- a/target/linux/x86/image/64.mk +++ b/target/linux/x86/image/64.mk @@ -1,7 +1,7 @@ define Device/generic DEVICE_TITLE := Generic x86/64 DEVICE_PACKAGES += kmod-amazon-ena kmod-bnx2 kmod-e1000e kmod-e1000 \ - kmod-forcedeth kmod-igb kmod-ixgbe kmod-r8169 + kmod-forcedeth kmod-igb kmod-ixgbe kmod-amd-xgbe kmod-r8169 GRUB2_VARIANT := generic endef TARGET_DEVICES += generic diff --git a/target/linux/x86/modules.mk b/target/linux/x86/modules.mk index 6ab80d03d9..41295d2d1f 100644 --- a/target/linux/x86/modules.mk +++ b/target/linux/x86/modules.mk @@ -19,6 +19,22 @@ endef $(eval $(call KernelPackage,amazon-ena)) +define KernelPackage/amd-xgbe + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=AMD Ethernet on SoC support + DEPENDS:=@PCI_SUPPORT @TARGET_x86_64 +kmod-lib-crc32c +kmod-ptp +kmod-libphy + KCONFIG:=CONFIG_AMD_XGBE + FILES:=$(LINUX_DIR)/drivers/net/ethernet/amd/xgbe/amd-xgbe.ko + AUTOLOAD:=$(call AutoLoad,35,amd-xgbe) +endef + +define KernelPackage/amd-xgbe/description + Kernel modules for AMD 10GbE Ethernet device on an AMD SoC. +endef + +$(eval $(call KernelPackage,amd-xgbe)) + + define KernelPackage/sound-cs5535audio TITLE:=CS5535/CS5536 Audio Controller DEPENDS:=@TARGET_x86_geode +kmod-ac97