Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2685281rdb; Mon, 5 Feb 2024 14:31:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2VWFagUaBP1fMpkQlWnmyLmiFvrtqwtE8U6VJrZRDj850z6IV8REu5QaQ3vN6giPwrX0p X-Received: by 2002:a05:6a20:d807:b0:19e:3096:ea24 with SMTP id iv7-20020a056a20d80700b0019e3096ea24mr1064541pzb.37.1707172315845; Mon, 05 Feb 2024 14:31:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707172315; cv=pass; d=google.com; s=arc-20160816; b=UBxxX7xFjq80as4iu+zyBHCzhl72x6/yG7KoCOfvkiseHVd4fCoooxn9go3H1OTVKJ iujqN2LN1ZulKhWtm5nX3sAQc2cGbAAXL8E/XG2hfhr8WBByMpM8uPF2/r3alglTHyOx EkGFXXznOhlWpL9zkWMHjPxDrIxcRekwCA7t76F1+G54riW3+zyKVj72cJLID+4qMQJ6 3vO+7EZ3ITzUz+0p/n0XJwujjN5y8ynRZS+c9l162xVUyt8XPOQC+WGW/O/y0i8R5GgA 92FYOlkJnf0mBlvKaGnVqYb+TC4zIuCaREbo2GlfvPxjQ6Gy1DHo/PTn72vM6C9udLA5 Cl7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=LtxFv4oA0pRnE3kfs9riObyfifkbdYO5WyAeOuC/znY=; fh=/d/LxK+KfD1BKDFvvwVUhFlepDYTHhx7+HQ/so+b0I0=; b=E6YHfpa6dYP4+y83ydf9RyhXYE2qZrzbMAXdRh3oMJeD6I9TExbLM/5Ld6XdrCAzZw ox14SHmLDi0lHWURX/8rIk/SPA43KtHb6Rm1nZN+b0HKWbt8PhO9cHNRWiiZNLH4SL3n MX1jgEo0oTdwyXE62gGlW7NpUJv2xsy5nSars6SZSt9CzT8HGrkwolOZAgGT+VZji0qX jomsNOdvVg2fa2uZkJ3SZiuLe+lSBua8bzCPw5q78FRM3yA+l1bKB3lcGhljc0DCFGCu t+roJAlhU+Qt7e2/D8HxWvaYqDkuLb/rs4Pu0AuqY8T6n1vxpWCH2sQ+LiE2Qy29ANi2 R+pQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LYHfCnrJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-54006-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54006-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXvnDz5IIjo4DdIG2oMb4qCHFpbi2jLDZBJBVa2c3Xb+yr4re7YJ0ar4ynuhmiy1yeBRsLLdimlxVgaVZH9KwZp7ys/WpeE9vu9cX9w8g== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b14-20020a631b0e000000b005d760c23e01si545034pgb.462.2024.02.05.14.31.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 14:31:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54006-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LYHfCnrJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-54006-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54006-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 91B66280EE7 for ; Mon, 5 Feb 2024 22:20:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 551435473F; Mon, 5 Feb 2024 22:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LYHfCnrJ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F11C54F613; Mon, 5 Feb 2024 22:08:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707170895; cv=none; b=SRkX5PAYcvzB34bENp+4Jg/g5IDhM7sxIV1yLMsws/W0G8UjroAGU53YwZRhf55CC1DR2mtQs46vlxdBMy7NIc0Z7oONwFU6bnIvftPFsl+i6lZLFW16Vd50VrdcQrC/0Uwh5CksTPDDCBC0xKjWqKLHxZ0wy9upfwHLH7Eaho8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707170895; c=relaxed/simple; bh=3+wmxxZEo3zoOBK3iDjQe4cWlQ13hqyzI1JNTHOM2DY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=in1B/tj+SnwQNQL2N2ni9QZYAO+/gLyhZ2qqLqb7Hia/VycHn7t04QZUk01zBYlrcT4tbotgbefksLOsV4KVJHH8DmF+x8ILUmL2ULgLSBBj3PgEFrcT100111dYNX+aQttCvRr2MY+cvNccY6bXsn8MPplQWp6BvSmaoQMIBLQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LYHfCnrJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 925C5C43601; Mon, 5 Feb 2024 22:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707170894; bh=3+wmxxZEo3zoOBK3iDjQe4cWlQ13hqyzI1JNTHOM2DY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=LYHfCnrJC0MoNerrURolj1p/JwIwZyjVyW5CZcVPv8HJB9TknpD30tkgcqOFQWa2s yMcdFiNRbqU4vbylfTcQrwN8qli3WlttIjlbiqDzgYlrleU+fbDL7AQx7BQZrRzTl3 QPP9VpuMGieRUzka4OeUo6CejGyES/cm+S+Unzt35/4qHsN8ksBNr7PB3BhzyW5HIe /PpxHB/RInOSrFsMMcDvFz6q1ippkYMbaHFzeNvNyU2oeTKkHOuNXiEzC+/dzRn8Ek QVTE6iILlHara9NIMZym2CK3DmVusjnkRxaFtlBeNWmU28rBAkncQ+I2y1opi31Toc cHfUrmKyJ1jwA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D02AC4829A; Mon, 5 Feb 2024 22:08:14 +0000 (UTC) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= via B4 Relay Date: Tue, 06 Feb 2024 01:08:06 +0300 Subject: [PATCH net-next v5 5/7] net: dsa: mt7530: remove pad_setup function pointer Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240206-for-netnext-mt7530-improvements-2-v5-5-d7d92a185cb1@arinc9.com> References: <20240206-for-netnext-mt7530-improvements-2-v5-0-d7d92a185cb1@arinc9.com> In-Reply-To: <20240206-for-netnext-mt7530-improvements-2-v5-0-d7d92a185cb1@arinc9.com> To: Daniel Golle , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King Cc: mithat.guner@xeront.com, erkin.bozoglu@xeront.com, Bartel Eerdekens , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, =?utf-8?q?Ar=C4=B1n=C3=A7_=C3=9CNAL?= , "Russell King (Oracle)" X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707170890; l=5489; i=arinc.unal@arinc9.com; s=arinc9-patatt; h=from:subject:message-id; bh=n5+xpZIW7qnhTKFDd7vPJov9lf6yPR2GoKsCkAIRvrg=; b=kMNp54q+kO3FGa+y7WXZVpA3csnPMf0XDvkXcqMGLbiZVm7TY1xtUnItSp+l/6Qnm0Lx1IFj5 a1HVlR6vThKDsuHg3/A+a4vqy14l4X1qJcsx7aKITA0an5Rgwf6BmzO X-Developer-Key: i=arinc.unal@arinc9.com; a=ed25519; pk=VmvgMWwm73yVIrlyJYvGtnXkQJy9CvbaeEqPQO9Z4kA= X-Endpoint-Received: by B4 Relay for arinc.unal@arinc9.com/arinc9-patatt with auth_id=115 X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= Reply-To: From: Arınç ÜNAL The pad_setup function pointer was introduced with 88bdef8be9f6 ("net: dsa: mt7530: Extend device data ready for adding a new hardware"). It was being used to set up the core clock and port 6 of the MT7530 switch, and pll of the MT7531 switch. All of these were moved to more appropriate locations, and it was never used for the switch on the MT7988 SoC. Therefore, this function pointer hasn't got a use anymore. Remove it. Acked-by: Daniel Golle Reviewed-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Signed-off-by: Arınç ÜNAL --- drivers/net/dsa/mt7530.c | 36 ++---------------------------------- drivers/net/dsa/mt7530.h | 3 --- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 65c2f5f275a3..e1fdef5766fb 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -467,18 +467,6 @@ mt7530_setup_port6(struct dsa_switch *ds, phy_interface_t interface) core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN); } -static int -mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface) -{ - return 0; -} - -static int -mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface) -{ - return 0; -} - static void mt7531_pll_setup(struct mt7530_priv *priv) { @@ -2603,14 +2591,6 @@ static void mt7988_mac_port_get_caps(struct dsa_switch *ds, int port, } } -static int -mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state) -{ - struct mt7530_priv *priv = ds->priv; - - return priv->info->pad_setup(ds, state->interface); -} - static int mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) @@ -2776,8 +2756,6 @@ mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode, if (priv->p6_interface == state->interface) break; - mt753x_pad_setup(ds, state); - if (mt753x_mac_config(ds, port, mode, state) < 0) goto unsupported; @@ -3095,11 +3073,6 @@ mt753x_conduit_state_change(struct dsa_switch *ds, mt7530_rmw(priv, MT7530_MFC, CPU_EN | CPU_PORT_MASK, val); } -static int mt7988_pad_setup(struct dsa_switch *ds, phy_interface_t interface) -{ - return 0; -} - static int mt7988_setup(struct dsa_switch *ds) { struct mt7530_priv *priv = ds->priv; @@ -3163,7 +3136,6 @@ const struct mt753x_info mt753x_table[] = { .phy_write_c22 = mt7530_phy_write_c22, .phy_read_c45 = mt7530_phy_read_c45, .phy_write_c45 = mt7530_phy_write_c45, - .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, .mac_port_config = mt7530_mac_config, }, @@ -3175,7 +3147,6 @@ const struct mt753x_info mt753x_table[] = { .phy_write_c22 = mt7530_phy_write_c22, .phy_read_c45 = mt7530_phy_read_c45, .phy_write_c45 = mt7530_phy_write_c45, - .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, .mac_port_config = mt7530_mac_config, }, @@ -3187,7 +3158,6 @@ const struct mt753x_info mt753x_table[] = { .phy_write_c22 = mt7531_ind_c22_phy_write, .phy_read_c45 = mt7531_ind_c45_phy_read, .phy_write_c45 = mt7531_ind_c45_phy_write, - .pad_setup = mt7531_pad_setup, .cpu_port_config = mt7531_cpu_port_config, .mac_port_get_caps = mt7531_mac_port_get_caps, .mac_port_config = mt7531_mac_config, @@ -3200,7 +3170,6 @@ const struct mt753x_info mt753x_table[] = { .phy_write_c22 = mt7531_ind_c22_phy_write, .phy_read_c45 = mt7531_ind_c45_phy_read, .phy_write_c45 = mt7531_ind_c45_phy_write, - .pad_setup = mt7988_pad_setup, .cpu_port_config = mt7988_cpu_port_config, .mac_port_get_caps = mt7988_mac_port_get_caps, .mac_port_config = mt7988_mac_config, @@ -3230,9 +3199,8 @@ mt7530_probe_common(struct mt7530_priv *priv) /* Sanity check if these required device operations are filled * properly. */ - if (!priv->info->sw_setup || !priv->info->pad_setup || - !priv->info->phy_read_c22 || !priv->info->phy_write_c22 || - !priv->info->mac_port_get_caps || + if (!priv->info->sw_setup || !priv->info->phy_read_c22 || + !priv->info->phy_write_c22 || !priv->info->mac_port_get_caps || !priv->info->mac_port_config) return -EINVAL; diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h index 80060cc740d2..26a6d2160c08 100644 --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h @@ -704,8 +704,6 @@ struct mt753x_pcs { * @phy_write_c22: Holding the way writing PHY port using C22 * @phy_read_c45: Holding the way reading PHY port using C45 * @phy_write_c45: Holding the way writing PHY port using C45 - * @pad_setup: Holding the way setting up the bus pad for a certain - * MAC port * @phy_mode_supported: Check if the PHY type is being supported on a certain * port * @mac_port_validate: Holding the way to set addition validate type for a @@ -726,7 +724,6 @@ struct mt753x_info { int regnum); int (*phy_write_c45)(struct mt7530_priv *priv, int port, int devad, int regnum, u16 val); - int (*pad_setup)(struct dsa_switch *ds, phy_interface_t interface); int (*cpu_port_config)(struct dsa_switch *ds, int port); void (*mac_port_get_caps)(struct dsa_switch *ds, int port, struct phylink_config *config); -- 2.40.1