Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2001833rdb; Sun, 4 Feb 2024 10:11:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHULZvq0lb22rBwPzKizqlTdZcEG2OMcxdZUJT+8hliXGj6ciNOJl6vYyd4Ry0Do756VJwX X-Received: by 2002:a17:902:da89:b0:1d9:6206:9cd4 with SMTP id j9-20020a170902da8900b001d962069cd4mr6350092plx.25.1707070285699; Sun, 04 Feb 2024 10:11:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707070285; cv=pass; d=google.com; s=arc-20160816; b=VUaE1VLA+rKcWDuYi9QU+ICLnsIVUXXI4fnqn8jk7XJG/kgqKDRVpMx891+kaNO3xH I1wyituu7no+Qa1ep6SdKnSb+Ksi8g0a/5nO5vnW/0EFdGvzv4Xsb8GldAIAp3Idaa97 S8UYGojPmaw9PRsQT1ocPlvSKbmDrQXJ3anpkQmRuS+rn+cIu8XzgYXv19ltOabsC7ZD zr2IscQ5Vb1m0seduv5M/7WHC3YidnZNAoPPsOKFqKGnQfYFyI+B5PeQMm5EQPmYbNjK P6tQDWbhk8lxjV6eOh36bXtlE5gV+j+l2LpePGuHtjo4WqdlhrhO+VBtDbqhJj0eQM6W eRAA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=PYcz89R33Vbh+hteH2uxagVcgEXlP6trCtTKBMirrXg=; fh=IouT1GZrXEswr6zA6PigOo7VRQ5slZWz4iF1f43Phjw=; b=tK+Q+pvz/+c+ELv3LuMVlhStLXMdJ9mU3CWMMnnJhsY7GVTXLMoPwEN48MY6oatWy+ kXJihR/eSXvq5ZbzlWnhRpTjxfNGFeE0rEebmtBcTkTa+GLK7utAW8+pqZ0wFgAEyVlg lFCV8211OwngkJKV7M2exC4jWz5Ps+8Rr3n5QKHUpOZNeLCJjSy4c4cfqKQDel8oEEgS Cad/v8y7p+BCISQPCkqdx8Wq9C6QZtqyF03x5y5VRst17ZCRuDg6TVICCOXmkMYZFvFu bmK1MfcdrDIL5nE5BEnfRa/SazliFkXcGPbShBYv18G8DD8fpaAeIvOpWTFkoWUnaeR3 H27w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=nGgIdTTW; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com); spf=pass (google.com: domain of linux-kernel+bounces-51838-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51838-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com X-Forwarded-Encrypted: i=1; AJvYcCWHfkgzekCy7Qe8QoAJQL95uv3EqVDEvdQGonkdNEddqO1YklrN+qz0W+6aGB2+TE5SjX+BwXhquhuLmkQkoHpxO3FtvElvhdlq0bFcsw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id n24-20020a63ee58000000b005cdd60a42f5si4630985pgk.838.2024.02.04.10.11.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 10:11:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51838-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=@arinc9.com header.s=gm1 header.b=nGgIdTTW; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com); spf=pass (google.com: domain of linux-kernel+bounces-51838-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51838-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com 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 02B7EB2188C for ; Sun, 4 Feb 2024 18:10:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EBD8C24A12; Sun, 4 Feb 2024 18:10:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b="nGgIdTTW" Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (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 51325249ED; Sun, 4 Feb 2024 18:10:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707070216; cv=none; b=sN94NKbpBbXuEmCaT7isqLAcrzK2UNSFDxu4ygo3Q3sPR8nZf2F6v4VceYVbvTMI0j19F9onWFCwLZRl/Ily5E7XkSWHJ24f5QoO/32WVcpOmKEp4swbAjwJtL6DoMp8AmCbRU2C2Z28ms/VfSL4ZnBI6IoNbZqtYQU3KQQbZgM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707070216; c=relaxed/simple; bh=5kYtyqCLUvdZv+qqyt+Qe8sLsY1B5uu19eqnKrr6/SI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QszgctQdzfGlaIn1wTi9iFB6jr6q5QLsdHD8ygQ/xX688svHLBHGMLPp2RzAUQ3hmSTVJcNSDRnRC/dCWU/CUtJqlG7Pz/rCdo2VC8DAfufTR1E0/Ppie8dP96e94/+RW7cK3UKRlGEI+yV6SfmYdLEugZf7jtuNzGDML16Mo+U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com; spf=pass smtp.mailfrom=arinc9.com; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b=nGgIdTTW; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arinc9.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 648CCC0004; Sun, 4 Feb 2024 18:10:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1707070211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PYcz89R33Vbh+hteH2uxagVcgEXlP6trCtTKBMirrXg=; b=nGgIdTTWmlkH0DkDso2eSM+L2dDdz01kEU0kZqK8M0d5a60UgsHWLSXYF8SEygdhsF2JY4 pLHaAvDotWIG9Ss4Wm9YD5PEYxhDEO4hUpxS+9sM+Wxu1l1u6/WTlUNePVtXqQkEouU6MI fbYBl+CJwGEBa5yEF+Kgt3RZOuExjOBuVi0Cj+tRUc9T9tsc+Ba2JioxHUEOld61NbaeQX nL7D/luQi0snXO8eQMh+CI+sxRH7Xi6Ea3WFLbw5VG9TknhbOiK5vvt3bNpAKHCSpflk6p bskM7fJtOhMAh7v8iTSfZTtJgC7L6JAxgJTVqovFNAipEHkmHAi1QD21zl1oqA== Message-ID: Date: Sun, 4 Feb 2024 21:10:04 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v4 4/7] net: dsa: mt7530: call port 6 setup from mt7530_mac_config() Content-Language: en-US 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, "Russell King (Oracle)" References: <20240204-for-netnext-mt7530-improvements-2-v4-0-02bf0abaadb8@arinc9.com> <20240204-for-netnext-mt7530-improvements-2-v4-4-02bf0abaadb8@arinc9.com> From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <20240204-for-netnext-mt7530-improvements-2-v4-4-02bf0abaadb8@arinc9.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: arinc.unal@arinc9.com On 4.02.2024 19:34, Arınç ÜNAL via B4 Relay wrote: > From: Arınç ÜNAL > > mt7530_pad_clk_setup() is called if port 6 is enabled. It used to do more > things than setting up port 6. That part was moved to more appropriate > locations, mt7530_setup() and mt7530_pll_setup(). > > Now that all it does is set up port 6, rename it to mt7530_setup_port6(), > and move it to a more appropriate location, under mt7530_mac_config(). > > Change mt7530_setup_port6() to void as there're no error cases. > > Leave an empty mt7530_pad_clk_setup() to satisfy the pad_setup function > pointer. > > This is the code path for setting up the ports before: > > dsa_switch_ops :: phylink_mac_config() -> mt753x_phylink_mac_config() > -> mt753x_mac_config() > -> mt753x_info :: mac_port_config() -> mt7530_mac_config() > -> mt7530_setup_port5() > -> mt753x_pad_setup() > -> mt753x_info :: pad_setup() -> mt7530_pad_clk_setup() > > This is after: > > dsa_switch_ops :: phylink_mac_config() -> mt753x_phylink_mac_config() > -> mt753x_mac_config() > -> mt753x_info :: mac_port_config() -> mt7530_mac_config() > -> mt7530_setup_port5() > -> mt7530_setup_port6() > > Reviewed-by: Vladimir Oltean > Reviewed-by: Russell King (Oracle) > Signed-off-by: Arınç ÜNAL > --- > drivers/net/dsa/mt7530.c | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c > index 82e90da1e52b..18842c759b63 100644 > --- a/drivers/net/dsa/mt7530.c > +++ b/drivers/net/dsa/mt7530.c > @@ -414,8 +414,8 @@ mt753x_preferred_default_local_cpu_port(struct dsa_switch *ds) > } > > /* Setup port 6 interface mode and TRGMII TX circuit */ > -static int > -mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface) > +static void > +mt7530_setup_port6(struct dsa_switch *ds, phy_interface_t interface) > { > struct mt7530_priv *priv = ds->priv; > u32 ncpo1, ssc_delta, xtal; > @@ -465,7 +465,11 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface) > > /* Enable the MT7530 TRGMII clocks */ > 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; > } > > @@ -2613,11 +2617,10 @@ mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode, > { > struct mt7530_priv *priv = ds->priv; > > - /* Only need to setup port5. */ > - if (port != 5) > - return 0; > - > - mt7530_setup_port5(priv->ds, interface); > + if (port == 5) { Stray brace, will remove. Arınç