Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2302217pxf; Sat, 27 Mar 2021 07:47:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3cmww2J3ORljbOQzhdHHNh91cdNT1lWaT6Hr5dTOOHAPN7UQGFVar5q2RI6YzHh3BGdXB X-Received: by 2002:a17:907:720a:: with SMTP id dr10mr20215534ejc.375.1616856457859; Sat, 27 Mar 2021 07:47:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616856457; cv=none; d=google.com; s=arc-20160816; b=Iv8dzKdilkVG02RFNUq5AiqGksUBirKLMycVogTTY4Pp3tTISGhHcair39nZ1YUe99 ykp6d8rB8zr1BRYhTl/YXCmwsoS5Dw8hGrEw+bPiM74hiqw6O9F1XgjaA0x1sb9QWweD +x5iPXARJB+/NbFDMxzjY/BQyWKBJ+kP9aOmH2MuF0mK0pNVVHNtIFSpX1OPT0rRadjO +h3ZDgNwoIJKq1DUgxj9UC/Pf01ZloC8cIl0zQiU/pyRtQx9aBy8+kli/A0V9+nNTZDu yzZ/NKGwg+mgL+NvXG+NQvejXvjTTNSTJtI5OBEC/an8isvosjAaqjo66hyaQZC/B+n7 hM9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=v72reuRSbiA/o3zlF+a0Y79NpEMZGeVDUaruHkq6n4E=; b=kgmZZaEhsYxJJ9MEu2VJNl8E9ace4llwRZ6+d9LS++OY/LftQuRWqD0qfeA7s46PNR qobvCab0G3/BXlNGqZdDq2rtp4OmwQf9ZsziH32KqbWm07/ni5cN5MJ9SvpDXyLi8pQt /sOwWRo29+FpsMEJLubFml832EH0N4IQkcqTa+UCJ3Iyv0sU3TwDOjWH5c2I0KGWnbvy EqAGUuSdbR+0Q3vqNUwvy/FBr7hg54aCZHBXUdkLx6THYx5YsDaGK4m3S6Hv0899RleU v0xLsZzI7ayGHdJeAK5Gjy2tC1TPfZbdoE83PbN0J0mfHmta3r7VmQCmhwAR8l4pXtin PNFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qh20si8682412ejb.749.2021.03.27.07.47.15; Sat, 27 Mar 2021 07:47:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230114AbhC0OqT (ORCPT + 99 others); Sat, 27 Mar 2021 10:46:19 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:51084 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229582AbhC0OqI (ORCPT ); Sat, 27 Mar 2021 10:46:08 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lQAC8-00DLHu-FL; Sat, 27 Mar 2021 15:45:44 +0100 Date: Sat, 27 Mar 2021 15:45:44 +0100 From: Andrew Lunn To: Ilya Lipnitskiy Cc: Sean Wang , Landen Chao , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Matthias Brugger , Philipp Zabel , Russell King , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next,v2] net: dsa: mt7530: clean up core and TRGMII clock setup Message-ID: References: <20210327055543.473099-1-ilya.lipnitskiy@gmail.com> <20210327060752.474627-1-ilya.lipnitskiy@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210327060752.474627-1-ilya.lipnitskiy@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 26, 2021 at 11:07:52PM -0700, Ilya Lipnitskiy wrote: > Three minor changes: > > - When disabling PLL, there is no need to call core_write_mmd_indirect > directly, use the core_write wrapper instead like the rest of the code > in the function does. This change helps with consistency and > readability. Move the comment to the definition of > core_read_mmd_indirect where it belongs. > > - Disable both core and TRGMII Tx clocks prior to reconfiguring. > Previously, only the core clock was disabled, but not TRGMII Tx clock. > So disable both, then configure them, then re-enable both, for > consistency. > > - The core clock enable bit (REG_GSWCK_EN) is written redundantly three > times. Simplify the code and only write the register only once at the > end of clock reconfiguration to enable both core and TRGMII Tx clocks. > > Tested on Ubiquiti ER-X running the GMAC0 and MT7530 in TRGMII mode. > > Signed-off-by: Ilya Lipnitskiy Thanks for moving the comment. Reviewed-by: Andrew Lunn Andrew