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 B6DE8C38142 for ; Sun, 22 Jan 2023 21:16:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 39F79856A1; Sun, 22 Jan 2023 22:15:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.b="dlRJAZDb"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="bcI1v7aC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3F692856A1; Sun, 22 Jan 2023 22:15:40 +0100 (CET) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AE7AF8566F for ; Sun, 22 Jan 2023 22:15:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=samuel@sholland.org Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D6B9A32004ED; Sun, 22 Jan 2023 16:15:35 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 22 Jan 2023 16:15:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1674422135; x=1674508535; bh=Mo A4sgmLVH/EnqViQJtM5vnLFhxXKEBRmW8lb8HApJs=; b=dlRJAZDbz74K8dr0hO WKNVrZW5nHJe+XC5w60W8hflK6qOUUQIb8Xg7F5hB57+wpFzGgP1KMo2naHYNke9 BFiSj3ZXlxlW6E46Qua6Cmcsb/0+G1COmNsmKGF3OE8YAHXR+4t6rf2ksWM0i+s4 fgwM35ub2MQHkbNswJQRpoaWcxiUy7oaEFeoFYkieWXKueJkpue/GHa2XTIsF57u DQNq3NiekMYr9EvNGP0/0c8joehQ6mI0bVc9xSYKxUDVhBu5qNXvanRVQKqd5Mbw 4jrqumb/Jz21U5rvNasWExhJrRTVuq/r3ZLr9Zm30cEZFLVdBeJT6N8+ssINIVy3 QYFA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1674422135; x=1674508535; bh=MoA4sgmLVH/En qViQJtM5vnLFhxXKEBRmW8lb8HApJs=; b=bcI1v7aCHIRVzE0vaFjRZLNB9V4Cx Kin45UjTE0gWs4PvWYKx/8Z5wTDKZHcdD1q06PDALT1tKi9JMDIT/XQdtTGl9PIS FuBN1hbVZUIaaY3UfHdO5wKZftpo6B6eEgNFK+C79sVRQvKdaAKht+KY2xUlO/vz gg5hNlXpf/jagN9MZ/as+nqEG+CTHYYr4JE6BMkJj83Kvb6w68QgN66iJv2MhAky 6DpIKb/afRbxyQ632DgwpQnELRHGE0Fop9x64rE7Ul/WaQiosrp1r+mqYLMJO3cK 1Z83lCSWBLDaolHBo8d0U3QbHifbyGvv/hui2Nvlly7fd/vvVyiNylbnA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudduiedgudeglecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghm uhgvlhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenuc ggtffrrghtthgvrhhnpedukeetueduhedtleetvefguddvvdejhfefudelgfduveeggeeh gfdufeeitdevteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 22 Jan 2023 16:15:34 -0500 (EST) From: Samuel Holland To: Andre Przywara , Jagan Teki Cc: Jesse Taube , Icenowy Zheng , u-boot@lists.denx.de, Samuel Holland Subject: [PATCH v2 2/4] sunxi: binman: Move BL31 and SCP firmware addresses to Kconfig Date: Sun, 22 Jan 2023 15:15:28 -0600 Message-Id: <20230122211531.23181-3-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20230122211531.23181-1-samuel@sholland.org> References: <20230122211531.23181-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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(-) diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi index 8a6c9e901a..f38359fd42 100644 --- a/arch/arm/dts/sunxi-u-boot.dtsi +++ b/arch/arm/dts/sunxi-u-boot.dtsi @@ -1,15 +1,5 @@ #include -#ifdef CONFIG_MACH_SUN50I_H6 -#define BL31_ADDR 0x104000 -#define SCP_ADDR 0x114000 -#elif defined(CONFIG_MACH_SUN50I_H616) -#define BL31_ADDR 0x40000000 -#else -#define BL31_ADDR 0x44000 -#define SCP_ADDR 0x50000 -#endif - / { aliases { #ifndef CONFIG_MACH_SUNIV @@ -64,8 +54,8 @@ os = "arm-trusted-firmware"; arch = "arm64"; compression = "none"; - load = ; - entry = ; + load = ; + entry = ; atf-bl31 { filename = "bl31.bin"; @@ -73,13 +63,13 @@ }; }; -#ifdef SCP_ADDR +#if CONFIG_SUNXI_SCP_BASE scp { description = "SCP firmware"; type = "firmware"; arch = "or1k"; compression = "none"; - load = ; + load = ; scp { filename = "scp.bin"; @@ -101,10 +91,10 @@ @config-SEQ { description = "NAME"; firmware = "atf"; -#ifndef SCP_ADDR - loadables = "uboot"; -#else +#if CONFIG_SUNXI_SCP_BASE loadables = "scp", "uboot"; +#else + loadables = "uboot"; #endif fdt = "fdt-SEQ"; }; diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index dbe6005daa..8e67f7e91d 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -110,6 +110,23 @@ config SUNXI_SRAM_ADDRESS Some newer SoCs map the boot ROM at address 0 instead and move the SRAM to a different address. +config SUNXI_BL31_BASE + hex + default 0x00044000 if MACH_SUN50I || MACH_SUN50I_H5 + default 0x00104000 if MACH_SUN50I_H6 + default 0x40000000 if MACH_SUN50I_H616 + default 0x0 + help + Address where BL31 (TF-A) is loaded, or zero if BL31 is not used. + +config SUNXI_SCP_BASE + hex + default 0x00050000 if MACH_SUN50I || MACH_SUN50I_H5 + default 0x00114000 if MACH_SUN50I_H6 + default 0x0 + help + Address where SCP firmware is loaded, or zero if it is not used. + config SUNXI_A64_TIMER_ERRATUM bool -- 2.37.4