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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 593B1C54E94 for ; Wed, 25 Jan 2023 12:24:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 88F05851A8; Wed, 25 Jan 2023 13:24:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id A4F5C85650; Wed, 25 Jan 2023 13:24:39 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 066CD84EEF for ; Wed, 25 Jan 2023 13:24:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D8B934B3; Wed, 25 Jan 2023 04:25:17 -0800 (PST) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4B59C3F71E; Wed, 25 Jan 2023 04:24:35 -0800 (PST) Date: Wed, 25 Jan 2023 12:24:22 +0000 From: Andre Przywara To: Simon Glass Cc: Samuel Holland , Jagan Teki , Jesse Taube , Icenowy Zheng , u-boot@lists.denx.de Subject: Re: [PATCH v2 2/4] sunxi: binman: Move BL31 and SCP firmware addresses to Kconfig Message-ID: <20230125122422.6724aa83@donnerap.cambridge.arm.com> In-Reply-To: References: <20230122211531.23181-1-samuel@sholland.org> <20230122211531.23181-3-samuel@sholland.org> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Tue, 24 Jan 2023 15:44:30 -0700 Simon Glass wrote: > Hi Samuel, > > On Mon, 23 Jan 2023 at 22:22, Samuel Holland wrote: > > > > Hi Simon, > > > > On 1/23/23 12:42, Simon Glass wrote: > > > HI Samuel, > > > > > > On Sun, 22 Jan 2023 at 14:16, Samuel Holland wrote: > > >> > > >> This is easier to read than the #ifdef staircase, provides better > > >> visibility into the memory map (alongside the other Kconfig > > >> definitions), and allows these addresses to be reused from code. > > >> > > >> Signed-off-by: Samuel Holland > > >> --- > > >> > > >> Changes in v2: > > >> - New patch for v2, split from the .dtsi changes > > >> > > >> arch/arm/dts/sunxi-u-boot.dtsi | 24 +++++++----------------- > > >> arch/arm/mach-sunxi/Kconfig | 17 +++++++++++++++++ > > >> 2 files changed, 24 insertions(+), 17 deletions(-) > > > > > > Reviewed-by: Simon Glass > > > > > > Is this info not in the device tree? > > > > It is not. These values do not correspond to any hardware property. For > > example, on A64/H5/H6, BL31 and SCP share a single "SRAM A2" region. The > > division of the SRAM between them was chosen arbitrarily (though now it > > is ABI). How would you represent this in the devicetree? > > I would probably add a new node for the SRAM, with partition > information within that, as is done for MTD. I am probably missing something, but why would we want to do that? Looks a bit like a solution looking for a problem to me. The split and assignment of the SRAM regions is an agreement between BL31, crust and U-Boot, with U-Boot taking the lead here, because it's the initial loader of those components, and does the packaging. So what would putting those addresses in the generic DT bring us, aside from more complicated code to look them up? Cheers, Andre