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 0612EC3DA6E for ; Wed, 3 Jan 2024 15:02:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To: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=Hr6QgzBZHtzmX8tXjjtQ8wQ1JcbbNzMt58DWFksiGrw=; b=coJfAU89C3aMcL IucnwrwvR21cp6F17mpiV7V3cwqZ/1ItQVEbVHpbEtgKFNK2MtutRgCfk93HXnAlKE8Q+Vt1YbeUt Xwgs3OM8XxfceXIo669vJ0o1Z1OQ/emRIQXMRIeN9+MR76L6dVtbyetgJTdLe0bfn3EDt6zZc2X4U xn9WlnghVNbexKkU4KWOB9yWzA7Yr261SdfdHY1htOF2gtCH53a31ZVPw+/MQiSfceNlFTMK0JlQh lJoBWb5/Jzl9hfw7xeWlTbCJIvR3pQk18l6YSIpI0/3EwoWajq9hgz37C29DtIhGHvx2usGsRT06j HvWIOV3RFca8rDfPWTeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rL2kS-00BCVU-3B; Wed, 03 Jan 2024 15:01:36 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rL2kQ-00BCTH-0a for linux-arm-kernel@lists.infradead.org; Wed, 03 Jan 2024 15:01:35 +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-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding: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=g8K4Wbg5JDQXx3q/iM3cUgJD+tm3dXGYqWadi7wsaLo=; b=vRPIlCafJtPTrLDLkNkZyvUl24 xXTcQv22UTsNwmoIsCywmF04xqy6lyWQK7KYruZXaUaDViF1OsvA9njVSvWZhVAjorCzROmbXDnZ5 HBNIdw52sG47eqZTfY1LV4xew4V0KVKtwyDSxrE+W45fbgni3Tk4ETlr8k5x8nxUvDd/eOn415kIZ Z3NrN5jVaJ0ePDyNWY1jLcUbVzZbDVrQ9TxJt6ajP33+fn5inC0g2cnbaW1NXLNnGiLtyOrKnzW6y NHn5jw87eNqwA+y0t2l9AkfpVAStCcudTUtAWpz9YWgt7jXCL/t8sJTKfWH6T7db6AbezzbiTJWR5 b42yMw4w==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:48018) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rL2k2-0007cb-1L; Wed, 03 Jan 2024 15:01:10 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rL2jz-0006Sx-I0; Wed, 03 Jan 2024 15:01:07 +0000 Date: Wed, 3 Jan 2024 15:01:07 +0000 From: "Russell King (Oracle)" To: Romain Gantois Cc: Alexandre Torgue , Jose Abreu , Andrew Lunn , Jakub Kicinski , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Paolo Abeni , Maxime Coquelin , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Marek Vasut , Clark Wang , Miquel Raynal , Sylvain Girard , Pascal EBERHARD , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH net 5/5] net: pcs: rzn1-miic: Init RX clock early if MAC requires it Message-ID: References: <20240103142827.168321-1-romain.gantois@bootlin.com> <20240103142827.168321-6-romain.gantois@bootlin.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240103142827.168321-6-romain.gantois@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240103_070134_239457_4607A3AF X-CRM114-Status: GOOD ( 12.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jan 03, 2024 at 03:28:25PM +0100, Romain Gantois wrote: > The GMAC1 controller in the RZN1 IP requires the RX MII clock signal to be > started before it initializes its own hardware, thus before it calls > phylink_start. > > Check the rxc_always_on pcs flag and enable the clock signal during the > link validation phase. However, validation is *not* supposed to change the configuration of the hardware. Validation may fail. The "interface" that gets passed to validation may never ever be selected. This change feels like nothing more than a hack. Since the MAC driver has to itself provide the PCS to phylink via the mac_select_pcs() method, the MAC driver already has knowledge of which PCS it is going to be using. Therefore, I think it may make sense to do something like this: int phylink_pcs_preconfig(struct phylink *pl, struct phylink_pcs *pcs) { if (pl->config->mac_requires_rxc) pcs->rxc_always_on = true; if (pcs->ops->preconfig) pcs->ops->pcs_preconfig(pcs); } and have stmmac call phylink_pcs_preconfig() for each PCS that it will be using during initialisation / resume paths? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel