Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1962054rdb; Sun, 4 Feb 2024 08:35:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNR7filTf2IVox+SVlkHqV7dD09RX7QN3U7fes0sDowu1vQY8nuO8wbZzQp/s3EtOQrnet X-Received: by 2002:a92:c612:0:b0:363:8560:977d with SMTP id p18-20020a92c612000000b003638560977dmr8856972ilm.3.1707064547011; Sun, 04 Feb 2024 08:35:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707064546; cv=pass; d=google.com; s=arc-20160816; b=raEaatLYXTSXIa47rvfkWujjvBRSJGPocCc0MPqzSltPub7XVODcs0OxexzwbK0+bw J4nZW+J6LAO2MmgFLei7WL+oDhfQmAFaQftoTJxtndl4Ac/M3pgRy0OiLEZ0wN4Vty+X SiOP2I6nZu4njL8XqshCC63nV5W9wZG8WRiEwjn9/JS1/XcFFK+HmPaigxmsw6QQRydM iW7AgYKzPJkneIYrtg12zVdYb2vwtUG4h3X6zj2Edik/udcCoarqBH+KbEXAsRxrWPwL Y9emxpR0TiJz+IRyurfaqn58wKRLOg+jCt3DpOtTwHtoBALz4V/0VXQwoVqqNvvaWIJr 9CxQ== 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=yWi1Dxt1npytyxDD/esdgEfiMnKr/NOt5yn0yiDADhU=; fh=v81VlbeNTwC07YSY6k2fQzdq7ZFlWQNXrYFHFXk+TtQ=; b=hsW1DXIciVPN5N6+EfS4iK/PbdAnSDNmuj6F2/pROTvQmLUmfPC2HVlMTiZZrXZB+h sJYn69ZG/jdhkf5qKQu0fXfwAdeprAKbnqdI/gdBJ3uS2iednT33T6Ih0yXuE8rOwwQr VCtQWMDl0T+HEAC8Tt6zpnJNJnVFxvVfhIBlpXKfUrevOO+/uGlNNmJZTRJ0sQSlc/+X EXnNoKj1AYOs90sVRr6QjtpWefQkysi6NNHYY/zpQsJ6a/TKqG8SCMzhqwuXtvIChR0N o6aEmTvqEz+njKhWLNtjFzlDZPj0wPEHB/QnxWwfhm4YwH67SU/t48Nna9dtDEq5ggMs I15w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tZ4nqoEw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51793-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51793-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; AJvYcCW9KpmYh3+YdWuDztG2JDRGqazHl6nNkacuWSXOkVEf3LtyWztYV0WTYl+oQ57Tc0AbqhiTLNZFSbYPL4FrBrdDbZ4j6g/muM91WNQd3A== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q17-20020a635c11000000b005cf88b065b1si4786696pgb.121.2024.02.04.08.35.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 08:35:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51793-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tZ4nqoEw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51793-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51793-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 5A522B21694 for ; Sun, 4 Feb 2024 16:35:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 670EC250FE; Sun, 4 Feb 2024 16:34:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tZ4nqoEw" 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 4F0D122EF6; Sun, 4 Feb 2024 16:34:52 +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=1707064492; cv=none; b=TDWZJOXNeXpFz0QfLy/D+z35HZp49QhlDN/nbUdoFuBuRBQElCRBxMHAk1pvIeH/VGDtozwlqTJiHcRkfg2lV0H6G+ThQa2YY3pUxqP6ynf6gcdsAXqCkLuAWq6+Xn0qQ2XFOpRFJusEEci5EPNGnP9sS8c6xVAF5gPOtQnTLoI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707064492; c=relaxed/simple; bh=Fe86iWho8fI4XxyBKTyIMviQITr3dMaVnTECycKgRWc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=g5a7tuzDf1hpwQbOo2l/jsPgWhRAMKlSGbua4/6+Gyd1omTpOL/d9VjWKmaviytMGLLUJfX6jptCJprcYdOPltLWxr0IOMO1rLgMEWTJ7C+hHsIF2bwybc+2cZdXxj0VdTFUYuSdSU9F2oAZzc665K5DCTL92qXTD7cUyW7qJIw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tZ4nqoEw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 03199C43330; Sun, 4 Feb 2024 16:34:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707064492; bh=Fe86iWho8fI4XxyBKTyIMviQITr3dMaVnTECycKgRWc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=tZ4nqoEw6+l0ZncxTCwXRtt9PXcIWZZZVCRLiwnTKUG9/rVO3Ta1wiDOAJgTAsB/x Ot6iBaY7jprTQKeNEZGh0Bp8skkgmE2XW4+kEhh6rKGOeCZpYZRhrmzL+BbatUj/2J MaOJiKYHU+Mym09kMbHg4JyCs7yKGitG65XZzrrInLUW6QoP4lFznfERVMxicLrVfW QdYU/nHdTrghJiEzFWF9+lQXYZ4DrgVPSyANaExIG6K4dbrueCLcboTGANUvQgP9mG WSLUGsz1dMYDVYFL4MWYrdH63m8WN38rqkfSl4kFi9FFpQ2IToBmmmHTNTcaPJOFeD 8zNtDW7+3JtrQ== 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 E187BC4829A; Sun, 4 Feb 2024 16:34:51 +0000 (UTC) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= via B4 Relay Date: Sun, 04 Feb 2024 19:34:23 +0300 Subject: [PATCH net-next v4 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: <20240204-for-netnext-mt7530-improvements-2-v4-5-02bf0abaadb8@arinc9.com> References: <20240204-for-netnext-mt7530-improvements-2-v4-0-02bf0abaadb8@arinc9.com> In-Reply-To: <20240204-for-netnext-mt7530-improvements-2-v4-0-02bf0abaadb8@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=1707064489; l=5489; i=arinc.unal@arinc9.com; s=arinc9-patatt; h=from:subject:message-id; bh=8oIjTGSuK5sNF4JfrrD3NorNm7YdEkL0b/Q8Dttz21s=; b=u9IfsG/nVjBcwJ6PJzc9A2RodVkW98XzCcmuTO5DSO8yGlpQuTAe2/vCjxJpEJFgXPmBvZ5PT LlRAlzYqSoiCDcKF/WlzKq6oErRfHIQDi2IWH38ikw6fs1kPM+dUD2x 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 18842c759b63..8a6312b3bb06 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