[openwrt/openwrt] realtek: drop legacy I/O functions

LEDE Commits lede-commits at lists.infradead.org
Mon Feb 2 04:57:30 PST 2026


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c1a9e35a77c1a4892d1fd89c11415ab579759f50

commit c1a9e35a77c1a4892d1fd89c11415ab579759f50
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Sun Feb 1 19:35:45 2026 +0100

    realtek: drop legacy I/O functions
    
    Remove the unneeded sw_xxx() macros.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/21824
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c  | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c b/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c
index 70657badca..76a61f6f23 100644
--- a/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c
+++ b/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c
@@ -28,9 +28,6 @@
 
 #define RTMDIO_PHY_POLL_MMD(dev, reg, bit)	((bit << 21) | (dev << 16) | reg)
 
-/* Register base */
-#define RTMDIO_SW_BASE				((volatile void *) 0xBB000000)
-
 /* MDIO bus registers */
 #define RTMDIO_RUN				BIT(0)
 
@@ -105,10 +102,6 @@
 #define RTMDIO_931X_SMI_10GPHY_POLLING_SEL3	(0x0CFC)
 #define RTMDIO_931X_SMI_10GPHY_POLLING_SEL4	(0x0D00)
 
-#define sw_r32(reg)				readl(RTMDIO_SW_BASE + reg)
-#define sw_w32(val, reg)			writel(val, RTMDIO_SW_BASE + reg)
-#define sw_w32_mask(clear, set, reg)		sw_w32((sw_r32(reg) & ~(clear)) | (set), reg)
-
 /*
  * On all Realtek switch platforms the hardware periodically reads the link status of all
  * PHYs. This is to some degree programmable, so that one can tell the hardware to read




More information about the lede-commits mailing list