Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6658040rwr; Tue, 25 Apr 2023 01:33:09 -0700 (PDT) X-Google-Smtp-Source: AKy350bQfnE4roPDcLGLfAiRJJFIJ9+ktLJUaNVKlbLFovz0PkqMlCJmjKMNtQQKLBIc9wW2UxIZ X-Received: by 2002:a05:6a20:3950:b0:d5:73ad:87c2 with SMTP id r16-20020a056a20395000b000d573ad87c2mr21596333pzg.56.1682411589309; Tue, 25 Apr 2023 01:33:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682411589; cv=none; d=google.com; s=arc-20160816; b=EdRzEgXJEmshAkyzDIs3WMnZf08WdOFuXCtCSdEO3sAOZvGNFhVdrWWWA8SMpcRQhT AfA5PtJNJdCJlpGYU5abj3fCqqYqF/qdBCa5Iln4nI7FaKx/S/nUErey2mBxPe2X6rQR NFwBB987EPzkuSa2l/IpEczi86NqfWbVCbemgUK0HhmpnfnHXfbuDD2ghvJ+l2t8xbGs OJacXMGxwk/2rdQ9JEPMR8kwQrUmRVL0bPy+L4PwC73t+bGExuEB4SC6VOoQCekb844q TBRowhgAA7tso8s7NAC7PHvEMk6MQxPgdmVz15tCwiP9KlfoVUoDszrEfc9jrh1Q05PR 2nxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=p1hEryQAzv4aINQksZVb0h+gLBTeh9K6WD5HzVy7o4c=; b=Yr4cVVLG/08Fr58ffc9u42kUnJiKfI/TFSYwOs3aC8uzd7+uD8XLkBIL8Ew4JoMZoA SF9CHXAV+vhMih1rOHgjgDW66FS8v6r+30HrxT5J6y2I+zZsKjB4BJqxzuW8PowlLST1 qqjp0LwmgOMcCXUyuTGlaigliRLYa+dZVmRoJUbrrHnK57myP7Z1Pl7rbk0mr/NYayCt Js5Oa10XIASphMXMDUE941EftAyhm84qNJsILXZm7ObA1w5uV2qdug1tE/BYXprxswTO e7E9Yc/z9jPexBvdWboc/hpc2KaKrcEyLwIpY3uDuFEcifaM06hdTI9hg/uanZgSXRcJ Dv4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="a/DDBHyM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a63f110000000b00524ba819b3csi12657059pgi.443.2023.04.25.01.32.57; Tue, 25 Apr 2023 01:33:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="a/DDBHyM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233795AbjDYIcP (ORCPT + 99 others); Tue, 25 Apr 2023 04:32:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233705AbjDYIbR (ORCPT ); Tue, 25 Apr 2023 04:31:17 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36FF813C0D; Tue, 25 Apr 2023 01:30:31 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-958bb7731a9so549958866b.0; Tue, 25 Apr 2023 01:30:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682411421; x=1685003421; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=p1hEryQAzv4aINQksZVb0h+gLBTeh9K6WD5HzVy7o4c=; b=a/DDBHyMc1TxlYJRDs0WMi6praxgJ15QDsq//WPEEJXVG6leYyGLzaRVwiFTADuwX+ 3PibbXoE+pRFr8V/9mpHlWAbtRLcLg5cPRkBvv4AS1HPTdea4KLLGELkI4Tp7WovuYAp /lNOWU5U65ZhSHf1Q03VjuhOxkfqWEtI9U4e0NAVhkatNTPU71sAnori5xYKkJGRFTWD Da7X8zGYv5FQAwtU7H123DWGFFrhwl+FN8l8LTVNiDxGQOeMu/L+FlqSN2WopqFBcOEd +N+JG18nfcSHkv7h4ue2hP/z1sM5Jw46EhDehzPbp64ow5rRCxsfqw6e3EhcfXxObcei Q7EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682411421; x=1685003421; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p1hEryQAzv4aINQksZVb0h+gLBTeh9K6WD5HzVy7o4c=; b=fGEsXtr7MlNx9r95milGrJeMukp3YNyCnQPV6A32GXA7o8G8IRfBfYKwMZ+umTlw5G PX7DgUpBSOzh/lOaufBHHt7Y4jimDbIAZ8KeCJuqQutbl3mRBgjaT1q8ioXaNg5FIYGs WLbVvLInrKDZ1oFi7mBW0eaZBy/1yjKo0VfAlFoomgeLwIvlTGCqO/dXJl9SGVSkwj80 wrl2tZLhJ0SLT1l/5HsLErObEvINQM7SgrN1NDUgYAzG7jvFoBaE8zefIhRq9gDJEdrj uN+aR2CZSU0ZsrnmMMg8UtfMuCk6FzJk0R4CKTMmJ9crfVil1bcSInhIQDh3JlVy5paM YnVw== X-Gm-Message-State: AAQBX9czx+s+8uSvKzqeJWs9uVFiqq2qzuzSlCmpEgYKZ08iS5OVL7px TmPPvtgS8zDWLV+vT3Jp6vE= X-Received: by 2002:a17:906:d210:b0:8b1:7de3:cfaa with SMTP id w16-20020a170906d21000b008b17de3cfaamr11259984ejz.3.1682411420827; Tue, 25 Apr 2023 01:30:20 -0700 (PDT) Received: from arinc9-PC.lan ([149.91.1.15]) by smtp.gmail.com with ESMTPSA id mc2-20020a170906eb4200b0094ca077c985sm6439028ejb.213.2023.04.25.01.30.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Apr 2023 01:30:20 -0700 (PDT) From: arinc9.unal@gmail.com X-Google-Original-From: arinc.unal@arinc9.com To: Sean Wang , Landen Chao , DENG Qingfang , Daniel Golle , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King Cc: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Richard van Schagen , Richard van Schagen , Frank Wunderlich , Bartel Eerdekens , erkin.bozoglu@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH net-next 12/24] net: dsa: mt7530: remove pad_setup function pointer Date: Tue, 25 Apr 2023 11:29:21 +0300 Message-Id: <20230425082933.84654-13-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230425082933.84654-1-arinc.unal@arinc9.com> References: <20230425082933.84654-1-arinc.unal@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Tested-by: Arınç ÜNAL Signed-off-by: Arınç ÜNAL Acked-by: Daniel Golle --- 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 6815d2579f37..2addd5e7fbe6 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -473,18 +473,6 @@ mt7530_setup_port6(struct dsa_switch *ds, phy_interface_t interface) return 0; } -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) { @@ -2563,14 +2551,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) @@ -2737,8 +2717,6 @@ mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode, if (priv->p6_configured) break; - mt753x_pad_setup(ds, state); - if (mt753x_mac_config(ds, port, mode, state) < 0) goto unsupported; break; @@ -3040,11 +3018,6 @@ static int mt753x_set_mac_eee(struct dsa_switch *ds, int port, return 0; } -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; @@ -3106,7 +3079,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, }, @@ -3118,7 +3090,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, }, @@ -3130,7 +3101,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, @@ -3143,7 +3113,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, @@ -3173,9 +3142,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 06037be5882c..f7a504e4c17b 100644 --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h @@ -696,8 +696,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 @@ -718,7 +716,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.37.2