Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp774710rdb; Fri, 2 Feb 2024 03:52:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxvwvC6CbdIZ7zirQ8cWnKaxNnFEN51+ssXgEeJAK95EW2L9uXC5COXMVopbt4vbdhqwY8 X-Received: by 2002:aa7:cfd2:0:b0:55f:3463:2109 with SMTP id r18-20020aa7cfd2000000b0055f34632109mr1459543edy.10.1706874734781; Fri, 02 Feb 2024 03:52:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706874734; cv=pass; d=google.com; s=arc-20160816; b=ADQwKE31BSWlb4pQDeviFY0CySXAgqKu7oLsnC0Xfz1wIhsjvUukrQgSkLJHCqPqZ0 dYb3oivBH1fAohIj3Rk4pDaxNaEUtQ/rvv5VFh8V4Dilm11m8HujcOCZfZZlrogIJyk7 /5te9K95k3EOAvB6YEh9cw6eyAVMjuPoV7kWaxxM+iEEvPxzwMU+5LAzGtP2GAA7um/b B8Yq6wAZPCE6Fj94i8oEvnHtrFFSFl2FTbBUxaniCakoYhaYvXp9eoIT2X6dOWKIEW1v ENkBKwP6AEb/8dyISl/Oareh0GHBYGDfg8gCW68nj9HssFJScU5nHamH39ZdGdMIeiJL PlBA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cIlxsvGg83BWYVggTT3nBjbFOe8N4Nii5E4TFnZPDZU=; fh=C3O8s07y7MLPonJYCq5v7O67Tsn3lvJa6bJt9ui63+8=; b=wzzaUROGVj3Jdodg67Kyyip17cHcPlE8IiB0DEBlz/8CjI7LaTYkYTm6ysJINBTd5T W1PatF0BxVAsrSx4gcfMUSgMVseDBCqc/xxGqI75w7x9N8aP6UtBp+GZX063gvlK06/+ MAaLVst+oNh55+Crq16L4l8PjgmucsSTyi1vpI4Hk6nC2es4D8TAHkxtNhH9TMFjDl91 BBGQ8PETh9MQZdNQG7iA1HSPD27CnyNfMI52LgLxy18NjO9vkn7BOIGamGAAJul7QVOR PYl2BoUGPxOT3rkzI5ChXDkSbRXON1QewScQ0akTFWJPEyRNtL5J/DUJlZTcrPid4zIi IzEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="OqmD8m/c"; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-49792-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk X-Forwarded-Encrypted: i=1; AJvYcCUxEjk6EwVt/16e6gOkSl6t8oa644diTZy5lOYgFl3gaNFpTq/AsvP0CHF/1gznARsTywZEdNUPA/O0gNZfvRI7iBhiWkJmolUjrAUOzg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a7-20020aa7d747000000b00560025f5fdasi158501eds.168.2024.02.02.03.52.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 03:52:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49792-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="OqmD8m/c"; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-49792-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 135F71F2A34A for ; Fri, 2 Feb 2024 11:51:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B100A13E202; Fri, 2 Feb 2024 11:51:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="OqmD8m/c" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (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 0107613E211; Fri, 2 Feb 2024 11:51:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706874687; cv=none; b=BGw0e54IV+4NxA45xHNtLJIIYj/9yESUC9EHW1wNzJjoyHaWFoEYqHYE46iPjvF0jmdOQi+OFqSWtNClympZV9We0gnQS3WV54cf5BjhnTYQDvOkLQbIsCMU4GAenvXMRHSpUtxZnyd75LcNTY9bvU+t663MVCqv3K6vues7x8U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706874687; c=relaxed/simple; bh=tmseyaSoz8Telz9bqfnPz+Tc5gw75RGbX7OtTxriO0k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HThbLcAksj/mDxDOQLEYI5uTmnZkSA3rmyJoiLEGRBJzd2b3DgqxrtTcN7BGDBTDiHdTDI6IhZ4Cbx7mYFxauMr6TvDpGDbOAGx03wfyIn76j07zQG3eu2WZdgpVsA+QDMWpERI2bHjiRx6fARiwr/Vqbzbu8NGO4CdgYgt5dD8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=OqmD8m/c; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk 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> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240202-for-netnext-mt7530-improvements-2-v3-5-63d5adae99ca@arinc9.com> Sender: Russell King (Oracle) 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!