[PATCH v2 1/3] Move mvswitch 88E6060 driver to the ath25
Sergey Ryazanov
ryazanov.s.a at gmail.com
Fri Dec 17 14:08:39 PST 2021
The only user of the swconfig-based mvswitch driver is the ath25 target.
All other targets have been switched to the upstream DSA implementation.
ath25 can not be switched to the DSA implementation due to lack of the
DTS support. mvswitch is still required for ath25 to support such boards
as Fonera 2.0g (FON2202). So make it target specific to keep generic
config and patches clean.
Suggested-by: Felix Fietkau <nbd at nbd.name>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a at gmail.com>
---
Changes in v2:
* new patch; earlier here was another patch that recovers mvswitch
support under the v5.10 kernel
.../files/drivers/net/phy/mvswitch.c | 0
.../files/drivers/net/phy/mvswitch.h | 0
.../patches-5.4/700-swconfig_mvswitch.patch | 23 +++++++++++++++++++
target/linux/generic/config-5.10 | 1 -
target/linux/generic/config-5.4 | 1 -
.../700-swconfig_switch_drivers.patch | 9 ++------
6 files changed, 25 insertions(+), 9 deletions(-)
rename target/linux/{generic => ath25}/files/drivers/net/phy/mvswitch.c (100%)
rename target/linux/{generic => ath25}/files/drivers/net/phy/mvswitch.h (100%)
create mode 100644 target/linux/ath25/patches-5.4/700-swconfig_mvswitch.patch
diff --git a/target/linux/generic/files/drivers/net/phy/mvswitch.c b/target/linux/ath25/files/drivers/net/phy/mvswitch.c
similarity index 100%
rename from target/linux/generic/files/drivers/net/phy/mvswitch.c
rename to target/linux/ath25/files/drivers/net/phy/mvswitch.c
diff --git a/target/linux/generic/files/drivers/net/phy/mvswitch.h b/target/linux/ath25/files/drivers/net/phy/mvswitch.h
similarity index 100%
rename from target/linux/generic/files/drivers/net/phy/mvswitch.h
rename to target/linux/ath25/files/drivers/net/phy/mvswitch.h
diff --git a/target/linux/ath25/patches-5.4/700-swconfig_mvswitch.patch b/target/linux/ath25/patches-5.4/700-swconfig_mvswitch.patch
new file mode 100644
index 0000000000..7f2c082432
--- /dev/null
+++ b/target/linux/ath25/patches-5.4/700-swconfig_mvswitch.patch
@@ -0,0 +1,23 @@
+--- a/drivers/net/phy/Kconfig
++++ b/drivers/net/phy/Kconfig
+@@ -284,6 +284,10 @@ config IP17XX_PHY
+ tristate "Driver for IC+ IP17xx switches"
+ select SWCONFIG
+
++config MVSWITCH_PHY
++ tristate "Driver for Marvell 88E6060 switches"
++ select ETHERNET_PACKET_MANGLE
++
+ config PSB6970_PHY
+ tristate "Lantiq XWAY Tantos (PSB6970) Ethernet switch"
+ select SWCONFIG
+--- a/drivers/net/phy/Makefile
++++ b/drivers/net/phy/Makefile
+@@ -27,6 +27,7 @@ obj-$(CONFIG_ADM6996_PHY) += adm6996.o
+ obj-$(CONFIG_AR8216_PHY) += ar8216.o ar8327.o
+ obj-$(CONFIG_SWCONFIG_B53) += b53/
+ obj-$(CONFIG_IP17XX_PHY) += ip17xx.o
++obj-$(CONFIG_MVSWITCH_PHY) += mvswitch.o
+ obj-$(CONFIG_PSB6970_PHY) += psb6970.o
+ obj-$(CONFIG_RTL8306_PHY) += rtl8306.o
+ obj-$(CONFIG_RTL8366_SMI) += rtl8366_smi.o
diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
index 27e3e90488..c37e33b13d 100644
--- a/target/linux/generic/config-5.10
+++ b/target/linux/generic/config-5.10
@@ -3675,7 +3675,6 @@ CONFIG_MULTIUSER=y
# CONFIG_MVMDIO is not set
# CONFIG_MVNETA_BM is not set
# CONFIG_MVSW61XX_PHY is not set
-# CONFIG_MVSWITCH_PHY is not set
# CONFIG_MV_XOR_V2 is not set
# CONFIG_MWAVE is not set
# CONFIG_MWL8K is not set
diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
index c452d263c5..1b3f896514 100644
--- a/target/linux/generic/config-5.4
+++ b/target/linux/generic/config-5.4
@@ -3343,7 +3343,6 @@ CONFIG_MULTIUSER=y
# CONFIG_MV643XX_ETH is not set
# CONFIG_MVMDIO is not set
# CONFIG_MVNETA_BM is not set
-# CONFIG_MVSWITCH_PHY is not set
# CONFIG_MV_XOR_V2 is not set
# CONFIG_MWAVE is not set
# CONFIG_MWL8K is not set
diff --git a/target/linux/generic/hack-5.4/700-swconfig_switch_drivers.patch b/target/linux/generic/hack-5.4/700-swconfig_switch_drivers.patch
index f30ad81e4e..b954bbb63e 100644
--- a/target/linux/generic/hack-5.4/700-swconfig_switch_drivers.patch
+++ b/target/linux/generic/hack-5.4/700-swconfig_switch_drivers.patch
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
-@@ -250,6 +250,85 @@ config LED_TRIGGER_PHY
+@@ -250,6 +250,81 @@ config LED_TRIGGER_PHY
for any speed known to the PHY.
@@ -50,10 +50,6 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
+ tristate "Driver for IC+ IP17xx switches"
+ select SWCONFIG
+
-+config MVSWITCH_PHY
-+ tristate "Driver for Marvell 88E6060 switches"
-+ select ETHERNET_PACKET_MANGLE
-+
+config PSB6970_PHY
+ tristate "Lantiq XWAY Tantos (PSB6970) Ethernet switch"
+ select SWCONFIG
@@ -100,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
config SFP
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
-@@ -22,6 +22,20 @@ libphy-$(CONFIG_LED_TRIGGER_PHY) += phy_
+@@ -22,6 +22,19 @@ libphy-$(CONFIG_LED_TRIGGER_PHY) += phy_
obj-$(CONFIG_PHYLINK) += phylink.o
obj-$(CONFIG_PHYLIB) += libphy.o
@@ -109,7 +105,6 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
+obj-$(CONFIG_AR8216_PHY) += ar8216.o ar8327.o
+obj-$(CONFIG_SWCONFIG_B53) += b53/
+obj-$(CONFIG_IP17XX_PHY) += ip17xx.o
-+obj-$(CONFIG_MVSWITCH_PHY) += mvswitch.o
+obj-$(CONFIG_PSB6970_PHY) += psb6970.o
+obj-$(CONFIG_RTL8306_PHY) += rtl8306.o
+obj-$(CONFIG_RTL8366_SMI) += rtl8366_smi.o
--
2.32.0
More information about the openwrt-devel
mailing list