From: Jonas Jelonek Date: Sat, 20 Dec 2025 21:09:52 +0000 (+0000) Subject: realtek: pcs: rtl931x: merge and drop unused helper X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75493a812fd5dbbd1839ecec3543cdc9ee7c3cca;p=thirdparty%2Fopenwrt.git realtek: pcs: rtl931x: merge and drop unused helper Merge the unused helper 'rtpcs_931x_sds_fiber_disable' into Fiber mode setting, and drop the helper itself. As with the MII helper in a previous commit, functionality is basically the same just with a value for OFF mode. If functionality is required later, Fiber mode setting can be used with the OFF mode instead of carrying the unused helper until it's used. Signed-off-by: Jonas Jelonek Link: https://github.com/openwrt/openwrt/pull/20736 Signed-off-by: Robert Marko --- diff --git a/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c b/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c index 91bcc6f3922..2b737bc35b6 100644 --- a/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c +++ b/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c @@ -2424,6 +2424,10 @@ static void rtpcs_931x_sds_fiber_mode_set(struct rtpcs_serdes *sds, rtpcs_931x_sds_mii_mode_set(sds, RTPCS_SDS_MODE_OFF); switch (hw_mode) { + case RTPCS_SDS_MODE_OFF: + val = 0x3f; + break; + case RTPCS_SDS_MODE_SGMII: val = 0x5; break; @@ -2494,14 +2498,6 @@ static void rtpcs_931x_sds_rx_reset(struct rtpcs_serdes *sds) mdelay(50); } -__always_unused -static void rtpcs_931x_sds_fiber_disable(struct rtpcs_serdes *sds) -{ - u32 v = 0x3F; - - rtpcs_sds_write_bits(sds, 0x1F, 0x9, 11, 6, v); -} - static int rtpcs_931x_sds_cmu_page_get(phy_interface_t mode) { switch (mode) {