]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ath79: rename downstream ag71xx driver
authorOskari Lemmela <oskari@lemmela.net>
Wed, 10 Jul 2024 07:55:16 +0000 (10:55 +0300)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 22 Sep 2024 16:42:34 +0000 (18:42 +0200)
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@lemmela.net>
Link: https://github.com/openwrt/openwrt/pull/15926
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/config-6.6
target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/Kconfig
target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/Makefile
target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_legacy_debugfs.c [moved from target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_debugfs.c with 100% similarity]
target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_legacy_mdio.c [moved from target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c with 99% similarity]
target/linux/ath79/patches-6.6/710-net-use-downstream-ag71xx.patch

index f2d06460394f0993f5b06e544fc66cfe4d26ca4f..ed0e84e316cdb3dcd2ef7126633f414727dbd2b1 100644 (file)
@@ -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
index dfcedcf70e853c1332c7ef2d4e4e7d9c17357c00..e1504b92347ff01475973e4cccb8a47b7aa2076c 100644 (file)
@@ -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
index 87add0d208a6fda49d42c93f91ef3e77cb59a34f..86e47290e652276d1d8be8a833309feabd59dd4b 100644 (file)
@@ -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
index fca072a83a4d3b9fbc7074822188b1fa1820d06a..da716d94c39eca727e1bef9de1d64eb84f35877b 100644 (file)
@@ -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);
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 fd05dbd0ca661666af7e26da8c3d109661d68d18..fda561a37431646b979894476e432503b30c2179 100644 (file)
@@ -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,
        }
 };
index 54e64fb11cf8e9ef10930fcccb0bef4ed77c4e54..0997aa1ab85271e3c4fca001a1fff56dd8447574 100644 (file)
@@ -13,30 +13,22 @@ Submitted-by: John Crispin <john@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/