Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2854873rwd; Mon, 22 May 2023 05:28:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5kQGLcuZ7vhktRXMt/NJTaORPEHi4oC9extYDpa8FvkoxtncP9o4d9TNrxbPrzxAXuXL0a X-Received: by 2002:a17:902:b7c5:b0:1ac:7f56:de04 with SMTP id v5-20020a170902b7c500b001ac7f56de04mr11201587plz.45.1684758539545; Mon, 22 May 2023 05:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684758539; cv=none; d=google.com; s=arc-20160816; b=AkfqKyvcTntWyMSbprAtqnodw+eL9N8xAYodu67VNea3vrUJS37pDqeYMR26HOR6is IxWuaKh2QWvGWSuSHmwRj06ApL7S6DNfWQPOku/hmeZJRYtyyeL2gDp17WJQSm3M0MQe bJHiwRnUh4r4/Ukf1CTZTcQtep/55OhbRSoj9jQ3wh0nRi6MBBUPciNH2bOhc1rZu7N1 dLbjM/sk3ZNKDocN6smkaHUnSS0CTalhUdgy2aFWUFWa8B/VYFs2HRUZa2i+M/H9MALC 88aqVqolgea6DsD74Jhqfq8eMRC7l+ay3GXV7hGvmN3BIffEFnAwGsY9i9p7ePr3Y4yG kw4w== 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=NC6YZzrcByzpZ4gpaBCW+or5QHPTH2iNbvDVQvL05bo=; b=a3xObEFMlEnsG+xEtPlLePgh1BgqkfPvI0lCBmjZH8Z5kel1K90CrOK8sKgbKbQFdP lY9p88yW+hX6jfKyNUieauNa/OxkUT4evd0zaNNiNCXg5QrWTzksML3ugKYZt5Ck8IF7 7PnJ5CYjJ370BsAUegaBw6BEeGK/8fZ9/yycW0aOLvZea6m1dZBB1XZVM45HUObQ7gNs AlWv/sa8L8m0vYy+o3WbkSxx6GdCW/HmV0oV6IH4HCPUPJQqduDDg0uLwmMLooCxa9vI Us4frRkJlaqEzssSibYoFucNNT05KRWI/6wS1BRzP9si5po+d3oIIoYwAHJwHYHeZB8s +98w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=BW308YhY; 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 jc3-20020a17090325c300b001ab0e4c0218si4385555plb.140.2023.05.22.05.28.47; Mon, 22 May 2023 05:28:59 -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=BW308YhY; 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 S233918AbjEVMSg (ORCPT + 99 others); Mon, 22 May 2023 08:18:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233823AbjEVMRo (ORCPT ); Mon, 22 May 2023 08:17:44 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D66721BD1; Mon, 22 May 2023 05:16:35 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-96f8d485ef3so368752066b.0; Mon, 22 May 2023 05:16:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684757779; x=1687349779; 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=NC6YZzrcByzpZ4gpaBCW+or5QHPTH2iNbvDVQvL05bo=; b=BW308YhYirBYDaC16QvJwMVBaZVb/Eh3rg9CYru+1WEZNs4BIiJSzw8PCSJWjfkg2A RzY5h0RMsWNZpHnhyw7yoapWpoMm4yjeeF6csc2geWmOvm5pb3Wym6FE920iKPgna8vk RYgN64SDBgEgAjvvwDeFBkSB/SEh9WV6tQjmZ8UVufeYwtXBny6icdn1v/oxHfMx1by0 l8t+Ldq8MPTu6X6uXC6kGJElv6FKXQxKdIXrdd88IeIsaLko/gaLQOpuY5DJGkhKf3K0 DPt98XD5Dg7rmwlhy/2wvR4ZK2prgN5g2gRu9A/m/jW2muibrOmLrO3fGa61BHPdS1Py Q9rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684757779; x=1687349779; 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=NC6YZzrcByzpZ4gpaBCW+or5QHPTH2iNbvDVQvL05bo=; b=TulKm1drgQGbcXxRoXG7Y9n+ayBQGYWt0rhBUGz6fG5aQ/H5qTGkPMafQdXLfszvcW zIb/Q8Ct9eMeFky673lQqUfvAzHw+WPAtbawYXXyUBgUgAE5n4XnLNZ55QhVXfjdFh42 gC7jVODpNcJbMt7yFVZOMhCGlI145Dywb8E6WXeSp5bkfebLiSm+CfpsC9kJiYtv/R+a IPUF+xqeLtFtCnRyfTJ6Bly0JCn5DrJW1rWrl0BR2p4Sd7FE614bo9xPrhd68RGEhjhs lHq/XYm00AZzW0GxrVKN5nVfWk621xSJjocT/F1yoKyQZoZrbrN0CUnKYGKYwp9tYwtR c+fA== X-Gm-Message-State: AC+VfDwXqElkSEw4ED8Ph6z2nZtemmbRkF5GdvvAPHu5xKwcDtfOVYvY mAXMBJfalTNqb0bx0Kgu8Ss= X-Received: by 2002:a17:907:9490:b0:94f:61f5:9ef7 with SMTP id dm16-20020a170907949000b0094f61f59ef7mr9594223ejc.44.1684757779023; Mon, 22 May 2023 05:16:19 -0700 (PDT) Received: from arinc9-PC.. ([149.91.1.15]) by smtp.gmail.com with ESMTPSA id y26-20020a17090614da00b009659fed3612sm2999950ejc.24.2023.05.22.05.16.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 05:16:18 -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, mithat.guner@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 11/30] net: dsa: mt7530: remove pad_setup function pointer Date: Mon, 22 May 2023 15:15:13 +0300 Message-Id: <20230522121532.86610-12-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522121532.86610-1-arinc.unal@arinc9.com> References: <20230522121532.86610-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 0b0ed1bd2afa..049f7be0d790 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) { @@ -2564,14 +2552,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) @@ -2738,8 +2718,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; @@ -3041,11 +3019,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; @@ -3107,7 +3080,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, }, @@ -3119,7 +3091,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, }, @@ -3131,7 +3102,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, @@ -3144,7 +3114,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, @@ -3174,9 +3143,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.39.2