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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CED47C636CC for ; Wed, 15 Feb 2023 12:52:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233810AbjBOMw0 (ORCPT ); Wed, 15 Feb 2023 07:52:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232736AbjBOMwX (ORCPT ); Wed, 15 Feb 2023 07:52:23 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C8AA3644D; Wed, 15 Feb 2023 04:52:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=WOYSFfQ0jaebxOnsbFhwjuQF7/Ba3lkdLaUdw2j21OU=; b=YW 9DTzbhY2DetOrcc4Hed33WxxEKGNvz0hK6keVtjE5/ERT0v+4gUFRND5ckuuXGd4aFj2b3hYyd5P1 wtPRv6SfTLZdggSPlNEcfSE5P+5t+F06Gwa44BPyXT8Xvxuvxs8JvVuHQ8YQas+MpgTTgxD7me6Ok lAHiNqbw2ixbsxc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pSHGO-0053CA-4X; Wed, 15 Feb 2023 13:51:56 +0100 Date: Wed, 15 Feb 2023 13:51:56 +0100 From: Andrew Lunn To: Cristian Ciocaltea Cc: Lee Jones , Rob Herring , Krzysztof Kozlowski , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Emil Renner Berthing , Conor Dooley , Palmer Dabbelt , Paul Walmsley , Albert Ou , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Richard Cochran , Sagar Kadam , Yanhong Wang , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: Re: [PATCH 08/12] net: stmmac: Add glue layer for StarFive JH7100 SoC Message-ID: References: <20230211031821.976408-1-cristian.ciocaltea@collabora.com> <20230211031821.976408-9-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 15, 2023 at 02:08:01AM +0200, Cristian Ciocaltea wrote: > On 2/11/23 18:11, Andrew Lunn wrote: > > > + > > > +#define JH7100_SYSMAIN_REGISTER28 0x70 > > > +/* The value below is not a typo, just really bad naming by StarFive ¯\_(ツ)_/¯ */ > > > +#define JH7100_SYSMAIN_REGISTER49 0xc8 > > > > Seems like the comment should be one line earlier? > > > > There is value in basing the names on the datasheet, but you could > > append something meaningful on the end: > > > > #define JH7100_SYSMAIN_REGISTER49_DLYCHAIN 0xc8 > > > > ??? > > Unfortunately the JH7100 datasheet I have access to doesn't provide any > information regarding the SYSCTRL-MAINSYS related registers. Maybe Emil > could provide some details here? If you have no reliable source of naming, just make a name up from how the register is used. This is why i suggested adding _DLYCHAIN, because that is what is written to it. You should be able to do the same with register 28. Andrew