From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 82667C47DB3 for ; Fri, 2 Feb 2024 11:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cIlxsvGg83BWYVggTT3nBjbFOe8N4Nii5E4TFnZPDZU=; b=Bx7Kpyhp64Fq/ecIEKehx/9Wxi BphZVpp0f3UOssTKtLUZYgE8m9fhfaCmHuiiuuOxppfM9p1r3OF2CauCtdF6hiqgQW32wYJZaJZyp DrmTlHi9SNFeqt30kmIGVM3VDxHZ2ghMrZBWzsqVITKMywaASGiwJFNjtNUJ4o35mtONQs6YG4+z5 IRc/mXbxntDwzPTNPCjZQU30joJJXJ/bGpqgVzEMfOQp0MtHuqFSCgd0Z9K3zGDV3NTkjUoIb55GG 5arHc//Uy3GppF8cWm02xD10o3VaQOzwRmxe6ygu/afBbs1I2EJS9/VSLgdU3zRTYv+wf0IvfUL/3 wQ5rXRLQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVs4v-0000000BN4N-095R; Fri, 02 Feb 2024 11:51:29 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVs4r-0000000BN3m-3C7Y; Fri, 02 Feb 2024 11:51:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=cIlxsvGg83BWYVggTT3nBjbFOe8N4Nii5E4TFnZPDZU=; b=OqmD8m/c5B7vFICq5Ev33gkvCd zn9HpBZjkLeFSbjTmF0+KV3kDCfrtUU8q2XpEmCsVIdKN1fLofI4H7osUKPxlvhaGw/YYoOO/yavh 0RxLKv9NKCsePeKLqJfl/stdpXKdZL8yV0CsvpCq/mESPDQRb8djrtVtflee4WUJPzsAnsO5KPQ0n 9HgJKZefg40oAb2w5pp7GSbtniF/orPv5hKa3eyVd+ENdChW1vvuw308QnoJOEgX+IsSReMZzV4Dv zEmQUn3RTgdm8vOvqYSuZyZ6yQP17vWW25KqcDIKHOVwh8JlFkcWO43yEhsyqLjD1Tii8peERhv7C l8MCJAQg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56268) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rVs4f-0005vW-10; Fri, 02 Feb 2024 11:51:13 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rVs4b-0008IK-DO; Fri, 02 Feb 2024 11:51:09 +0000 Date: Fri, 2 Feb 2024 11:51:09 +0000 From: "Russell King (Oracle)" To: arinc.unal@arinc9.com Cc: 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 , 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 Subject: Re: [PATCH net-next v3 5/7] net: dsa: mt7530: simplify mt7530_setup_port6() and change to void Message-ID: References: <20240202-for-netnext-mt7530-improvements-2-v3-0-63d5adae99ca@arinc9.com> <20240202-for-netnext-mt7530-improvements-2-v3-5-63d5adae99ca@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240202-for-netnext-mt7530-improvements-2-v3-5-63d5adae99ca@arinc9.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240202_035125_819965_027ACC64 X-CRM114-Status: GOOD ( 16.79 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Fri, Feb 02, 2024 at 12:19:11PM +0300, Arınç ÜNAL via B4 Relay wrote: > From: Arınç ÜNAL > > This code is from before this driver was converted to phylink API. Phylink > deals with the unsupported interface cases before mt7530_setup_port6() is > run. Therefore, the default case would never run. However, it must be > defined nonetheless to handle all the remaining enumeration values, the > phy-modes. > > Switch to if statement for RGMII and return which simplifies the code and > saves an indent. > > Set P6_INTF_MODE, which is the the three least significant bits of the > MT7530_P6ECR register, to 0 for RGMII even though it will already be 0 > after reset. This is to keep supporting dynamic reconfiguration of the port > in the case the interface changes from TRGMII to RGMII. > > Disable the TRGMII clocks for all cases. They will be enabled if TRGMII is > being used. > > Read XTAL after checking for RGMII as it's only needed for the TRGMII > interface mode. > > Change mt7530_setup_port6() to void now that there're no error cases left. > > Reviewed-by: Daniel Golle > Signed-off-by: Arınç ÜNAL Yay. Less possible errors in mac_config()! Reviewed-by: Russell King (Oracle) Thanks! -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!