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 D8339C4167B for ; Wed, 29 Nov 2023 11:36:02 +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=auEHcu2aW1/1zbGNZaSP9f7b9z5Xsvl3l/Gmqz/l3So=; b=sjH6CO7Am87J8W KMytsKZpxp+PSgoYz8N7w96hpr1bqsig6QD+TCR8yePsFmZ+oUn61BvUGJEkzdXeo1Dc0y5xeWiU6 paxXySFQffS+fz9XIQpG/1g8W/J5VgLGaFpDksq439S6in+YtEepNtEO4rr/YWDoNRLOi8BTnbj0S zTZJ9l5nGth3vH4nuPUAZ5jPCQyRIjJJP0c5516PGQpGV60oxC2J/A2Ux/qE+QG7gbeN+iOX9gfEA mt0da4T08dI7Cs2sjczJxYXSBbqOKR7xjggrMhCfNIOlE2QjOibDAKyQsevTSuD6ADGYaymNh5Atg ij+kIB6srwhHaOBClUiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8Iqs-00891m-1p; Wed, 29 Nov 2023 11:35:34 +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 1r8Iqn-0088w7-20 for linux-arm-kernel@lists.infradead.org; Wed, 29 Nov 2023 11:35:33 +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=rqS+h/QhB+l3YOA1zOKZSiEXB38gEHQM7lW0MLULbqg=; b=vuzdJXagBK8d7m5cAmLL0Boojc QyyhacdZgGAZS2j6Hit5ht9BRy5aUqNw+7TaK/yQcKNNG4Gm5VsmU2C6r5zrPk/c/RODcxSIfcXY9 t2CNXc8fL009N6jI30245Z1FtuxIezXE7Y6p60LWcBLeq4wP+NwYmJ7Hshxq4tJkyfufrqe0mCr5D 3v1TfYbAfnmkZ8Q413fHNagFsWg0usjA/RDbJ23DsP0gt9j6dwHVt5sdiS/xpwfY+e+pSi48774LV HmanbcFoR+0rnLz7cQaWEEbQDX7fTJYYbgwCY+ru11YjTTU9idzi1TTVscPzF8L3jBz5lFphvE34g Gy9+ohPw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:48210) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r8IqR-0000Iz-2l; Wed, 29 Nov 2023 11:35:08 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1r8IqS-0003xO-Ap; Wed, 29 Nov 2023 11:35:08 +0000 Date: Wed, 29 Nov 2023 11:35:08 +0000 From: "Russell King (Oracle)" To: Sneh Shah Cc: Vinod Koul , Bhupesh Sharma , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@quicinc.com, Andrew Halaney Subject: Re: [PATCH net] net: stmmac: update Rx clk divider for 10M SGMII Message-ID: References: <20231124050818.1221-1-quic_snehshah@quicinc.com> <47c9eb95-ff6a-4432-a7ef-1f3ebf6f593f@quicinc.com> <3bf6f666-b58a-460f-88f5-ad8ec08bfbbc@quicinc.com> <474a8942-e22f-4899-acb9-f794d01fdfe9@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <474a8942-e22f-4899-acb9-f794d01fdfe9@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231129_033529_672007_6A9ED504 X-CRM114-Status: GOOD ( 25.05 ) 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, Nov 29, 2023 at 04:56:53PM +0530, Sneh Shah wrote: > > > On 11/27/2023 3:35 PM, Russell King (Oracle) wrote: > > On Mon, Nov 27, 2023 at 03:17:20PM +0530, Sneh Shah wrote: > >> On 11/27/2023 2:09 PM, Russell King (Oracle) wrote: > >>> On Mon, Nov 27, 2023 at 11:25:34AM +0530, Sneh Shah wrote: > >>>> On 11/24/2023 2:42 PM, Russell King (Oracle) wrote: > >>>>> The next concern I have is that you're only doing this for SPEED_10. > >>>>> If it needs to be programmed for SPEED_10 to work, and not any of the > >>>>> other speeds, isn't this something that can be done at initialisation > >>>>> time? If it has to be done depending on the speed, then don't you need > >>>>> to do this for each speed with an appropriate value? > >>>> > >>>> This field programming is required only for 10M speed in for SGMII mode. other speeds are agnostic to this field. Hence we are programming it always when SGMII link comes up in 10M mode. init driver data for ethqos is common for sgmii and rgmii. As this fix is specific to SGMII we can't add this to init driver data. > >>> > >>> I wasn't referring to adding it to driver data. I was asking whether it > >>> could be done in the initialisation path. > >>> > >> No, IOMACRO block is configured post phylink up regardless of RGMII or SGMII mode. We are not updating them at driver initialization time itself. > > > > What reason (in terms of the hardware) requires you to do this every > > time you select 10M speed? Does the hardware change the value in the > > register? > > > Yes, the hardware changes the value in register every time the interface is toggled. That is the reason we have ethqos_configure_sgmii function to configure registers whenever there is link activity. That is sufficient reason to write it each time - and it would be good to mention this in a comment above the write in ethqos_configure_sgmii(). Thanks. -- 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