kernel: modules: make ar8216/8327 modularizable
authorChristian 'Ansuel' Marangi <ansuelsmth@gmail.com>
Sat, 22 Jan 2022 01:03:18 +0000 (02:03 +0100)
committerChristian 'Ansuel' Marangi <ansuelsmth@gmail.com>
Sun, 5 Jun 2022 14:58:48 +0000 (16:58 +0200)
Make ar8216/8327 swconfig driver modularizable and add
entry to the netdevices.mk kernel modules file.

Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
package/kernel/linux/modules/netdevices.mk
target/linux/generic/hack-5.10/700-swconfig_switch_drivers.patch
target/linux/generic/hack-5.15/700-swconfig_switch_drivers.patch

index ec470be5eeb89f0d3db4ff7aafa66db710a5d1ab..32cd0dcdcdb2cf439ec01f85fe896376253098e2 100644 (file)
@@ -417,6 +417,22 @@ endef
 $(eval $(call KernelPackage,switch-rtl8367b))
 
 
+define KernelPackage/switch-ar8xxx
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=Atheros AR8216/8327 switch support
+  DEPENDS:=+kmod-swconfig
+  KCONFIG:=CONFIG_AR8216_PHY
+  FILES:=$(LINUX_DIR)/drivers/net/phy/ar8xxx.ko
+  AUTOLOAD:=$(call AutoLoad,43,ar8xxx,1)
+endef
+
+define KernelPackage/switch-ar8xxx/description
+ Atheros AR8216/8327 switch support
+endef
+
+$(eval $(call KernelPackage,switch-ar8xxx))
+
+
 define KernelPackage/natsemi
   SUBMENU:=$(NETWORK_DEVICES_MENU)
   TITLE:=National Semiconductor DP8381x series
index b90e1fc441b3ce1c23a3005de84312bbd3359441..48be4400256c8d71de5b2a56c2252c65bb825ad0 100644 (file)
@@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +        Support for FC is very limited.
 +
 +config AR8216_PHY
-+      tristate "Driver for Atheros AR8216 switches"
++      tristate "Driver for Atheros AR8216/8327 switches"
 +      select SWCONFIG
 +      select ETHERNET_PACKET_MANGLE
 +
@@ -95,13 +95,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  config AMD_PHY
 --- a/drivers/net/phy/Makefile
 +++ b/drivers/net/phy/Makefile
-@@ -24,6 +24,19 @@ libphy-$(CONFIG_LED_TRIGGER_PHY)    += phy_
+@@ -24,6 +24,21 @@ libphy-$(CONFIG_LED_TRIGGER_PHY)    += phy_
  obj-$(CONFIG_PHYLINK)         += phylink.o
  obj-$(CONFIG_PHYLIB)          += libphy.o
  
 +obj-$(CONFIG_SWCONFIG)                += swconfig.o
 +obj-$(CONFIG_ADM6996_PHY)     += adm6996.o
-+obj-$(CONFIG_AR8216_PHY)      += ar8216.o ar8327.o
++obj-$(CONFIG_AR8216_PHY)      += ar8xxx.o
++ar8xxx-y                      += ar8216.o
++ar8xxx-y                      += ar8327.o
 +obj-$(CONFIG_SWCONFIG_B53)    += b53/
 +obj-$(CONFIG_IP17XX_PHY)      += ip17xx.o
 +obj-$(CONFIG_PSB6970_PHY)     += psb6970.o
index b90e1fc441b3ce1c23a3005de84312bbd3359441..48be4400256c8d71de5b2a56c2252c65bb825ad0 100644 (file)
@@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +        Support for FC is very limited.
 +
 +config AR8216_PHY
-+      tristate "Driver for Atheros AR8216 switches"
++      tristate "Driver for Atheros AR8216/8327 switches"
 +      select SWCONFIG
 +      select ETHERNET_PACKET_MANGLE
 +
@@ -95,13 +95,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  config AMD_PHY
 --- a/drivers/net/phy/Makefile
 +++ b/drivers/net/phy/Makefile
-@@ -24,6 +24,19 @@ libphy-$(CONFIG_LED_TRIGGER_PHY)    += phy_
+@@ -24,6 +24,21 @@ libphy-$(CONFIG_LED_TRIGGER_PHY)    += phy_
  obj-$(CONFIG_PHYLINK)         += phylink.o
  obj-$(CONFIG_PHYLIB)          += libphy.o
  
 +obj-$(CONFIG_SWCONFIG)                += swconfig.o
 +obj-$(CONFIG_ADM6996_PHY)     += adm6996.o
-+obj-$(CONFIG_AR8216_PHY)      += ar8216.o ar8327.o
++obj-$(CONFIG_AR8216_PHY)      += ar8xxx.o
++ar8xxx-y                      += ar8216.o
++ar8xxx-y                      += ar8327.o
 +obj-$(CONFIG_SWCONFIG_B53)    += b53/
 +obj-$(CONFIG_IP17XX_PHY)      += ip17xx.o
 +obj-$(CONFIG_PSB6970_PHY)     += psb6970.o