[openwrt/openwrt] ath79: rename downstream ag71xx driver
LEDE Commits
lede-commits at lists.infradead.org
Sun Sep 22 09:46:21 PDT 2024
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b42c7e24109c001844071616612054c2c99da4ae
commit b42c7e24109c001844071616612054c2c99da4ae
Author: Oskari Lemmela <oskari at lemmela.net>
AuthorDate: Wed Jul 10 10:55:16 2024 +0300
ath79: rename downstream ag71xx driver
Rename the downstream ag71xx driver to ag71xx-legacy.
It allows both upstream and downstream drivers to be compiled into modules.
Signed-off-by: Oskari Lemmela <oskari at lemmela.net>
Link: https://github.com/openwrt/openwrt/pull/15926
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
target/linux/ath79/config-6.6 | 7 ++++---
.../drivers/net/ethernet/atheros/ag71xx/Kconfig | 8 ++++----
.../drivers/net/ethernet/atheros/ag71xx/Makefile | 14 ++++++-------
.../drivers/net/ethernet/atheros/ag71xx/ag71xx.h | 10 ++++-----
.../{ag71xx_debugfs.c => ag71xx_legacy_debugfs.c} | 0
.../ag71xx/{ag71xx_mdio.c => ag71xx_legacy_mdio.c} | 2 +-
.../710-net-use-downstream-ag71xx.patch | 24 ++++++++--------------
7 files changed, 29 insertions(+), 36 deletions(-)
diff --git a/target/linux/ath79/config-6.6 b/target/linux/ath79/config-6.6
index f2d0646039..ed0e84e316 100644
--- a/target/linux/ath79/config-6.6
+++ b/target/linux/ath79/config-6.6
@@ -1,6 +1,7 @@
-CONFIG_AG71XX=y
-# CONFIG_AG71XX_DEBUG is not set
-CONFIG_AG71XX_DEBUG_FS=y
+# CONFIG_AG71XX is not set
+CONFIG_AG71XX_LEGACY=y
+# CONFIG_AG71XX_LEGACY_DEBUG is not set
+CONFIG_AG71XX_LEGACY_DEBUG_FS=y
CONFIG_AR8216_PHY=y
CONFIG_AR8216_PHY_LEDS=y
CONFIG_ARCH_32BIT_OFF_T=y
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/Kconfig b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/Kconfig
index dfcedcf70e..e1504b9234 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/Kconfig
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/Kconfig
@@ -1,4 +1,4 @@
-config AG71XX
+config AG71XX_LEGACY
tristate "Atheros AR7XXX/AR9XXX built-in ethernet mac support"
depends on ATH79
select PHYLIB
@@ -6,14 +6,14 @@ config AG71XX
If you wish to compile a kernel for AR7XXX/91XXX and enable
ethernet support, then you should always answer Y to this.
-if AG71XX
+if AG71XX_LEGACY
-config AG71XX_DEBUG
+config AG71XX_LEGACY_DEBUG
bool "Atheros AR71xx built-in ethernet driver debugging"
help
Atheros AR71xx built-in ethernet driver debugging messages.
-config AG71XX_DEBUG_FS
+config AG71XX_LEGACY_DEBUG_FS
bool "Atheros AR71xx built-in ethernet driver debugfs support"
depends on DEBUG_FS
help
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/Makefile b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/Makefile
index 87add0d208..86e47290e6 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/Makefile
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/Makefile
@@ -2,12 +2,12 @@
# Makefile for the Atheros AR71xx built-in ethernet macs
#
-ag71xx-y += ag71xx_main.o
-ag71xx-y += ag71xx_gmac.o
-ag71xx-y += ag71xx_ethtool.o
-ag71xx-y += ag71xx_phy.o
+ag71xx_legacy-y += ag71xx_main.o
+ag71xx_legacy-y += ag71xx_gmac.o
+ag71xx_legacy-y += ag71xx_ethtool.o
+ag71xx_legacy-y += ag71xx_phy.o
-ag71xx-$(CONFIG_AG71XX_DEBUG_FS) += ag71xx_debugfs.o
+ag71xx_legacy-$(CONFIG_AG71XX_LEGACY_DEBUG_FS) += ag71xx_legacy_debugfs.o
-obj-$(CONFIG_AG71XX) += ag71xx_mdio.o
-obj-$(CONFIG_AG71XX) += ag71xx.o
+obj-$(CONFIG_AG71XX_LEGACY) += ag71xx_legacy_mdio.o
+obj-$(CONFIG_AG71XX_LEGACY) += ag71xx_legacy.o
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
index fca072a83a..da716d94c3 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
@@ -40,7 +40,7 @@
#include <asm/mach-ath79/ar71xx_regs.h>
#include <asm/mach-ath79/ath79.h>
-#define AG71XX_DRV_NAME "ag71xx"
+#define AG71XX_DRV_NAME "ag71xx-legacy"
/*
* For our NAPI weight bigger does *NOT* mean better - it means more
@@ -68,7 +68,7 @@
#define AG71XX_TX_RING_SIZE_MAX 256
#define AG71XX_RX_RING_SIZE_MAX 256
-#ifdef CONFIG_AG71XX_DEBUG
+#ifdef CONFIG_AG71XX_LEGACY_DEBUG
#define DBG(fmt, args...) pr_debug(fmt, ## args)
#else
#define DBG(fmt, args...) do {} while (0)
@@ -195,7 +195,7 @@ struct ag71xx {
u32 pllreg[3];
struct regmap *pllregmap;
-#ifdef CONFIG_AG71XX_DEBUG_FS
+#ifdef CONFIG_AG71XX_LEGACY_DEBUG_FS
struct ag71xx_debug debug;
#endif
};
@@ -425,7 +425,7 @@ static inline void ag71xx_int_disable(struct ag71xx *ag, u32 ints)
ag71xx_cb(ag, AG71XX_REG_INT_ENABLE, ints);
}
-#ifdef CONFIG_AG71XX_DEBUG_FS
+#ifdef CONFIG_AG71XX_LEGACY_DEBUG_FS
int ag71xx_debugfs_root_init(void);
void ag71xx_debugfs_root_exit(void);
int ag71xx_debugfs_init(struct ag71xx *ag);
@@ -441,7 +441,7 @@ static inline void ag71xx_debugfs_update_int_stats(struct ag71xx *ag,
u32 status) {}
static inline void ag71xx_debugfs_update_napi_stats(struct ag71xx *ag,
int rx, int tx) {}
-#endif /* CONFIG_AG71XX_DEBUG_FS */
+#endif /* CONFIG_AG71XX_LEGACY_DEBUG_FS */
int ag71xx_ar7240_init(struct ag71xx *ag, struct device_node *np);
void ag71xx_ar7240_cleanup(struct ag71xx *ag);
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_debugfs.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_legacy_debugfs.c
similarity index 100%
rename from target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_debugfs.c
rename to target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_legacy_debugfs.c
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_legacy_mdio.c
similarity index 99%
rename from target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c
rename to target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_legacy_mdio.c
index fd05dbd0ca..fda561a374 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_legacy_mdio.c
@@ -241,7 +241,7 @@ static struct platform_driver ag71xx_mdio_driver = {
.probe = ag71xx_mdio_probe,
.remove = ag71xx_mdio_remove,
.driver = {
- .name = "ag71xx-mdio",
+ .name = "ag71xx-legacy-mdio",
.of_match_table = ag71xx_mdio_match,
}
};
diff --git a/target/linux/ath79/patches-6.6/710-net-use-downstream-ag71xx.patch b/target/linux/ath79/patches-6.6/710-net-use-downstream-ag71xx.patch
index 54e64fb11c..0997aa1ab8 100644
--- a/target/linux/ath79/patches-6.6/710-net-use-downstream-ag71xx.patch
+++ b/target/linux/ath79/patches-6.6/710-net-use-downstream-ag71xx.patch
@@ -13,30 +13,22 @@ Submitted-by: John Crispin <john at phrozen.org>
--- a/drivers/net/ethernet/atheros/Kconfig
+++ b/drivers/net/ethernet/atheros/Kconfig
-@@ -17,14 +17,7 @@ config NET_VENDOR_ATHEROS
+@@ -26,6 +26,8 @@ config AG71XX
+ If you wish to compile a kernel for AR7XXX/91XXX and enable
+ ethernet support, then you should always answer Y to this.
- if NET_VENDOR_ATHEROS
-
--config AG71XX
-- tristate "Atheros AR7XXX/AR9XXX built-in ethernet mac support"
-- depends on ATH79
-- select PHYLINK
-- imply NET_SELFTESTS
-- help
-- If you wish to compile a kernel for AR7XXX/91XXX and enable
-- ethernet support, then you should always answer Y to this.
+source "drivers/net/ethernet/atheros/ag71xx/Kconfig"
-
++
config ATL2
tristate "Atheros L2 Fast Ethernet support"
+ depends on PCI
--- a/drivers/net/ethernet/atheros/Makefile
+++ b/drivers/net/ethernet/atheros/Makefile
-@@ -3,7 +3,7 @@
- # Makefile for the Atheros network device drivers.
+@@ -4,6 +4,7 @@
#
--obj-$(CONFIG_AG71XX) += ag71xx.o
-+obj-$(CONFIG_AG71XX) += ag71xx/
+ obj-$(CONFIG_AG71XX) += ag71xx.o
++obj-$(CONFIG_AG71XX_LEGACY) += ag71xx/
obj-$(CONFIG_ATL1) += atlx/
obj-$(CONFIG_ATL2) += atlx/
obj-$(CONFIG_ATL1E) += atl1e/
More information about the lede-commits
mailing list