From decc4f6ba808fb8aa469cd4886ffeea1bb86bcda Mon Sep 17 00:00:00 2001 From: Jonas Jelonek Date: Fri, 12 Dec 2025 20:05:52 +0000 Subject: [PATCH] realtek: pcs: rtl930x: drop unused and broken function Drop the unused and broken function rtpcs_930x_sds_clock_wait from the PCS driver. The proper working variant is already some lines above and called rtpcs_930x_sds_wait_clock_ready. Signed-off-by: Jonas Jelonek Link: https://github.com/openwrt/openwrt/pull/21146 Signed-off-by: Robert Marko --- .../files-6.12/drivers/net/pcs/pcs-rtl-otto.c | 20 ------------------- 1 file changed, 20 deletions(-) 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 8368870b620..def6b445d4e 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 @@ -966,26 +966,6 @@ static void rtpcs_930x_sds_tx_config(struct rtpcs_ctrl *ctrl, int sds, rtpcs_sds_write_bits(ctrl, sds, page, 0x18, 15, 12, impedance); } -/* Wait for clock ready, this assumes the SerDes is in XGMII mode - * timeout is in ms - */ -__always_unused -static int rtpcs_930x_sds_clock_wait(struct rtpcs_ctrl *ctrl, int timeout) -{ - u32 v; - unsigned long start = jiffies; - unsigned long end = start + (HZ / 1000) * timeout; - - do { - rtpcs_sds_write_bits(ctrl, 2, 0x1f, 0x2, 15, 0, 53); - v = rtpcs_sds_read_bits(ctrl, 2, 0x1f, 20, 5, 4); - if (v == 3) - return 0; - } while (time_before(jiffies, end)); - - return 1; -} - __always_unused static void rtpcs_930x_sds_rxcal_dcvs_manual(struct rtpcs_ctrl *ctrl, u32 sds_num, u32 dcvs_id, bool manual, u32 dvcs_list[])