From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 09 Jan 2024 10:18:04 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rN8FI-00A6A4-18 for lore@lore.pengutronix.de; Tue, 09 Jan 2024 10:18:04 +0100 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rN8FH-0001Cf-Jt for lore@pengutronix.de; Tue, 09 Jan 2024 10:18:04 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To: Cc:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hfcP8s0GLXzJbQpLtIqC71a30GXz8JnIV6aByGXfnow=; b=Co6Wj93lReVKKpVrz+MOwkrosa CIVnnBzStSAKAWBj2xyc5AhvnhQbhFWcjNzHOT5cYIIHH9msCbyEmvbdQcZ+DUcdCnIcc/KUCjDzP QoDhzqrFQ63xtasS6niwfGpQasvioOBDZ5GCGLCaYpZeAbSMQNJtebzWdEVHguD9qQfNm8s+Nr1VR 99luOQjZdlUt0rnUe8sYm+a3ex6lh3gaBr6LujE9o/GqOYDiMALSBmyj44BbB/rn9MBZDHjvzCAF9 pBLAWRHwSowP/MwMODl7mbInoEP4SgBz+0wXGfzmyT4OoBV8qUGdosRhjsqCDUgIa3ykuO25XAv1i 5CqMOjow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rN8DX-007SML-1y; Tue, 09 Jan 2024 09:16:15 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rN8DR-007SIi-2j for barebox@lists.infradead.org; Tue, 09 Jan 2024 09:16:12 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rN8DO-0000Oj-Ty; Tue, 09 Jan 2024 10:16:06 +0100 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rN8DO-001RWW-G9; Tue, 09 Jan 2024 10:16:06 +0100 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rN8DO-001A8q-1Q; Tue, 09 Jan 2024 10:16:06 +0100 From: Sascha Hauer To: Barebox List Date: Tue, 9 Jan 2024 10:15:55 +0100 Message-Id: <20240109091603.235589-3-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240109091603.235589-1-s.hauer@pengutronix.de> References: <20240109091603.235589-1-s.hauer@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240109_011609_904675_A3EB57E4 X-CRM114-Status: GOOD ( 12.18 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH 02/10] ARM: Layerscape: LS1028a: reserve DDR region for TF-A X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) On LS1028a the TF-A is placed in DDR, so we have to reserve the region in order to keep Linux away from it. Signed-off-by: Sascha Hauer --- arch/arm/mach-layerscape/soc.c | 2 ++ drivers/mci/imx-esdhc-pbl.c | 3 ++- include/mach/layerscape/layerscape.h | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-layerscape/soc.c b/arch/arm/mach-layerscape/soc.c index 4d4ef05d4b..5f9d0d5171 100644 --- a/arch/arm/mach-layerscape/soc.c +++ b/arch/arm/mach-layerscape/soc.c @@ -91,6 +91,8 @@ static int ls1028a_init(void) layerscape_register_pbl_image_handler(); + reserve_sdram_region("tfa", LS1028A_TFA_RESERVED_START, LS1028A_TFA_RESERVED_SIZE); + return 0; } diff --git a/drivers/mci/imx-esdhc-pbl.c b/drivers/mci/imx-esdhc-pbl.c index 2c74d101e4..2d071eaca8 100644 --- a/drivers/mci/imx-esdhc-pbl.c +++ b/drivers/mci/imx-esdhc-pbl.c @@ -21,6 +21,7 @@ #endif #ifdef CONFIG_ARCH_LAYERSCAPE #include +#include #endif #include "sdhci.h" #include "imx-esdhc.h" @@ -387,7 +388,7 @@ static int ls1028a_esdhc_start_image(void __iomem *base, struct dram_regions_inf .socdata = &data, }; void *sdram = (void *)0x80000000; - void (*bl31)(void) = (void *)0xfbe00000; + void (*bl31)(void) = (void *)LS1028A_TFA_RESERVED_START; size_t bl31_size; void *bl31_image; struct bl2_to_bl31_params_mem_v2 *params; diff --git a/include/mach/layerscape/layerscape.h b/include/mach/layerscape/layerscape.h index a048b7ef9e..6f420dd4f4 100644 --- a/include/mach/layerscape/layerscape.h +++ b/include/mach/layerscape/layerscape.h @@ -3,6 +3,8 @@ #ifndef __MACH_LAYERSCAPE_H #define __MACH_LAYERSCAPE_H +#include + #define LS1046A_DDR_SDRAM_BASE 0x80000000 #define LS1046A_DDR_FREQ 2100000000 @@ -16,6 +18,12 @@ #define LS1028A_SP_SHARED_DRAM_SIZE SZ_2M #define LS1028A_TZC400_BASE 0x01100000 +#define LS1028A_TFA_SIZE SZ_64M +#define LS1028A_TFA_SHRD SZ_2M +#define LS1028A_TFA_RESERVED_SIZE (LS1028A_TFA_SIZE + LS1028A_TFA_SHRD) +#define LS1028A_TFA_RESERVED_START (0x100000000 - LS1028A_TFA_RESERVED_SIZE) +#define LS1028A_TFA_START (0x100000000 - LS1028A_TFA_SIZE) + enum bootsource ls1046a_bootsource_get(void); enum bootsource ls1021a_bootsource_get(void); -- 2.39.2