Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1902191rdb; Sun, 4 Feb 2024 06:16:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJ9ER+R3+V3d7l3dNDFNNwUC6DHSCiWrthK211tjEdtFCGa9aSXZPnfiPXkzXT+BD3vRFy X-Received: by 2002:a17:90a:e387:b0:28f:fa9d:ebdf with SMTP id b7-20020a17090ae38700b0028ffa9debdfmr4837966pjz.3.1707056162118; Sun, 04 Feb 2024 06:16:02 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCV3KiYHcIKMcIxKTfjA/fl0zvemUJg1Jsm8Kj1BAToHw7x/Vcd6qaWztu9W++K4vNY7PqIeuGoxNpy/CtCOCAPrRy2X7de+ucsdnIa4Pg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g1-20020a17090adb0100b0028d9b5be596si2962134pjv.28.2024.02.04.06.16.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:16:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51694-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=vBcdYC6o; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-51694-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51694-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8B06D282B9B for ; Sun, 4 Feb 2024 14:16:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C644225D0; Sun, 4 Feb 2024 14:15:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vBcdYC6o" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4E9F4224EE; Sun, 4 Feb 2024 14:15:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707056147; cv=none; b=W28efLuj++b0wykB0ZleBkG9ZdevogspGgYuGvEuAFvjuILmShPaOzhpLs8T5Oa6ojidvlt8qQuXXFuUyq0sRmB36ge8NhlquAhYXBp7J/UALXz3vg0HLKvHCcu3yN5ya+1/aGUM1AL6Fi3k6J79Px36PwTyRCY+EBiqqotiuGE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707056147; c=relaxed/simple; bh=JmTkGp8i+vw27c+X20EOYx2e0BmRC9rlkGs/pm+GBV8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Pojn8QHsBXKRdef8UJlSmJjG9O+o19dQ+2GMFsbNKOP/6eQpXP9bWEk+0I5GuIfzB3q5TGeHkVDZiPLHoiOQzDGAI58Sbox5ql3DRZN9vzarKFUQKf1uL4tMXhMQ4K9UnLP2I1F3iLwbplc/NqnabtjknINde3ac1DdoL61laCg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vBcdYC6o; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59333C433C7; Sun, 4 Feb 2024 14:15:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707056146; bh=JmTkGp8i+vw27c+X20EOYx2e0BmRC9rlkGs/pm+GBV8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vBcdYC6oZ4MQ6fjYbAD2N4VpqR5hsL7ErqO3yCInP/aH16QftZKyMD+JtyzDVere7 RDMY0koAcQpC1VRDCdbrOUbumH2fulXE6j2ICTgi7u9rLqvpmAZ4JIG5+Nc4JdhSlo PfMIZAe6kinODgWG7CxE2r4zI9qPaTxrHkpuuTuZfQ9U1tbKm/+yOk66Ulya5gnFgM IJ7gFkIDbgybjayLEhhpmX1wVgbaqcpvVJbKv8/X4BZJQGcCanN4dhWuYAZ5RezB+1 9ElwnGuyPcxKdo0bLJORQeVZa4i442Bk8vkhDZsN/Sg/9Mcox0E4VgdoBcY08/h9xN NvrdpGSbGb6xA== Date: Sun, 4 Feb 2024 14:15:41 +0000 From: Simon Horman To: Thierry Reding Cc: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH net-next v2 2/3] net: stmmac: Allow drivers to provide a default AXI configuration Message-ID: <20240204141541.GA927333@kernel.org> References: <20240202-stmmac-axi-config-v2-0-64eab2bab17b@nvidia.com> <20240202-stmmac-axi-config-v2-2-64eab2bab17b@nvidia.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=us-ascii Content-Disposition: inline In-Reply-To: <20240202-stmmac-axi-config-v2-2-64eab2bab17b@nvidia.com> On Fri, Feb 02, 2024 at 12:53:34PM +0100, Thierry Reding wrote: > From: Thierry Reding > > In many cases the AXI configuration can be derived from the compatible > string, so there's no need to add the configuration to DT. Allow drivers > to pass in the default AXI configuration so they can be properly set up > without extra data in DT. > > Signed-off-by: Thierry Reding .. > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > index 650ec8d2f5d7..0d5f2cebd6fc 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > @@ -91,34 +91,49 @@ static int dwmac1000_validate_ucast_entries(struct device *dev, > * if required, from device-tree the AXI internal register can be tuned > * by using platform parameters. > */ > -static struct stmmac_axi *stmmac_axi_setup(struct platform_device *pdev) > +static struct stmmac_axi *stmmac_axi_setup(struct platform_device *pdev, > + struct stmmac_resources *res) Hi Thierry, Please consider adding @res to the kernel doc for stmmac_axi_setup, just a few lines above this hunk. ..