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 770D5C433F5 for ; Thu, 26 May 2022 13:44:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 769F984373; Thu, 26 May 2022 15:43:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=konsulko.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 59B7384322; Thu, 26 May 2022 15:42:33 +0200 (CEST) Received: from mail-vs1-f45.google.com (mail-vs1-f45.google.com [209.85.217.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 354028430E for ; Thu, 26 May 2022 15:42:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tom.rini@gmail.com Received: by mail-vs1-f45.google.com with SMTP id 68so1423602vse.11 for ; Thu, 26 May 2022 06:42:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1vqHgG3uQy87FX8gkLw0ls1NwnY8u1bSSvAyZLepXYE=; b=f/UBQ1I4xE23LS5rT1QHWVVwR4IU9hMYbqlG4vt8iItkzX9RtcGl8z9G8ymGh3s16S cnRRbUY94ugZ5EFzxl3kONp+amFagUevC5+02vN6U/Ls29XaWv1RPpZrrW/XpikZCccD kWb1JLa3/o4IzZnxOShHiGEPZpG7b5VPcoytbzZ2f+aqJAPZjUgZJOf85w1n5QMEcWTW yZP0o9ZE83ORmGleFhR9o6GSktMAAUOieUXhT/fa33TFGM+T+xHExO1cVOsIcJozYRYT eVBZdFMFZ5D0IJMfjLxEqdcbkhEPVGHDM6XDvPPOMY+4FsZ1eTDyb0n7q12dvzCxccaT pmTg== X-Gm-Message-State: AOAM5324N1tTQ8KJRYFqFXQb6tuFjj/bacXlVxjiOVxTDtbXqdzmetfz 8sZf/SnlYX2+ZXwhLob8y7mCoB1SmQ== X-Google-Smtp-Source: ABdhPJwZGQXMUi6niQ0KDsuVth0m/P9nerI1xlGp2ubws3PLYU9ALmEVbwSuofNNA8/5UWzrCW7rxA== X-Received: by 2002:ad4:5dc2:0:b0:461:f62a:2646 with SMTP id m2-20020ad45dc2000000b00461f62a2646mr29553182qvh.81.1653572535652; Thu, 26 May 2022 06:42:15 -0700 (PDT) Received: from localhost.localdomain (2603-6081-7b00-25fd-0000-0000-0000-1003.res6.spectrum.com. [2603:6081:7b00:25fd::1003]) by smtp.gmail.com with ESMTPSA id j22-20020a05620a0a5600b006a10aa7908dsm1124264qka.38.2022.05.26.06.42.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 06:42:15 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 04/11] arm: Use CONFIG_SPL_STACK or CONFIG_SYS_INIT_SP_ADDR directly. Date: Thu, 26 May 2022 09:42:00 -0400 Message-Id: <20220526134207.3147526-4-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220526134207.3147526-1-trini@konsulko.com> References: <20220526134207.3147526-1-trini@konsulko.com> 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.5 at phobos.denx.de X-Virus-Status: Clean In some cases, we define CONFIG_SYS_INIT_SP_ADDR differently for SPL or full U-Boot. This case should be making use of CONFIG_SPL_STACK, as that's what that variable is for. In a few other cases we define CONFIG_SPL_STACK directly to CONFIG_SYS_INIT_SP_ADDR, but do not need to as the code handles this correctly, normally. Signed-off-by: Tom Rini --- include/configs/imxrt1020-evk.h | 5 ----- include/configs/imxrt1050-evk.h | 5 ----- include/configs/sam9x60_curiosity.h | 5 +---- include/configs/sama5d27_som1_ek.h | 5 +---- include/configs/sama5d27_wlsom1_ek.h | 5 +---- include/configs/sama5d2_icp.h | 5 +---- include/configs/sama5d2_xplained.h | 5 +---- include/configs/sama5d3_xplained.h | 5 +---- include/configs/sama5d3xek.h | 5 +---- include/configs/sama5d4_xplained.h | 5 +---- include/configs/sama5d4ek.h | 5 +---- include/configs/sama7g5ek.h | 5 +---- include/configs/smartweb.h | 5 +---- include/configs/socfpga_soc64_common.h | 10 +++------- include/configs/stm32f746-disco.h | 5 ----- 15 files changed, 14 insertions(+), 66 deletions(-) diff --git a/include/configs/imxrt1020-evk.h b/include/configs/imxrt1020-evk.h index 79feab389e32..afae6a4e387a 100644 --- a/include/configs/imxrt1020-evk.h +++ b/include/configs/imxrt1020-evk.h @@ -24,12 +24,7 @@ * Configuration of the external SDRAM memory */ -/* For SPL */ -#ifdef CONFIG_SUPPORT_SPL -#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR #define CONFIG_SYS_SPL_LEN 0x00008000 #define CONFIG_SYS_UBOOT_START 0x800023FD -#endif -/* For SPL ends */ #endif /* __IMXRT1020_EVK_H */ diff --git a/include/configs/imxrt1050-evk.h b/include/configs/imxrt1050-evk.h index 5c2f975ba7f0..4b341a349c2f 100644 --- a/include/configs/imxrt1050-evk.h +++ b/include/configs/imxrt1050-evk.h @@ -31,12 +31,7 @@ * Configuration of the external SDRAM memory */ -/* For SPL */ -#ifdef CONFIG_SUPPORT_SPL -#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR #define CONFIG_SYS_SPL_LEN 0x00008000 #define CONFIG_SYS_UBOOT_START 0x800023FD -#endif -/* For SPL ends */ #endif /* __IMXRT1050_EVK_H */ diff --git a/include/configs/sam9x60_curiosity.h b/include/configs/sam9x60_curiosity.h index 2708711a4ebc..aa3feb4a367d 100644 --- a/include/configs/sam9x60_curiosity.h +++ b/include/configs/sam9x60_curiosity.h @@ -20,12 +20,9 @@ #define CONFIG_SYS_SDRAM_BASE 0x20000000 #define CONFIG_SYS_SDRAM_SIZE 0x8000000 /* 128 MB */ -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_INIT_SP_ADDR 0x218000 -#else +#define CONFIG_SPL_STACK 0x218000 #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_SDRAM_BASE + 16 * 1024 + CONFIG_SYS_MALLOC_F_LEN - \ GENERATED_GBL_DATA_SIZE) -#endif #endif diff --git a/include/configs/sama5d27_som1_ek.h b/include/configs/sama5d27_som1_ek.h index eb29f211ef01..933dcace9d77 100644 --- a/include/configs/sama5d27_som1_ek.h +++ b/include/configs/sama5d27_som1_ek.h @@ -14,14 +14,11 @@ #undef CONFIG_SYS_AT91_MAIN_CLOCK #define CONFIG_SYS_AT91_MAIN_CLOCK 24000000 /* from 24 MHz crystal */ -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_INIT_SP_ADDR 0x218000 -#else #define CONFIG_SYS_INIT_SP_ADDR \ (0x22000000 + 16 * 1024 - GENERATED_GBL_DATA_SIZE) -#endif /* SPL */ +#define CONFIG_SPL_STACK 0x218000 #define CONFIG_SPL_BSS_START_ADDR 0x20000000 #define CONFIG_SYS_SPL_MALLOC_START 0x20080000 #define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000 diff --git a/include/configs/sama5d27_wlsom1_ek.h b/include/configs/sama5d27_wlsom1_ek.h index 54ef48ce3edb..9bf7016acaf0 100644 --- a/include/configs/sama5d27_wlsom1_ek.h +++ b/include/configs/sama5d27_wlsom1_ek.h @@ -19,14 +19,11 @@ #define CONFIG_SYS_SDRAM_BASE 0x20000000 #define CONFIG_SYS_SDRAM_SIZE 0x10000000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_INIT_SP_ADDR 0x218000 -#else #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE) -#endif /* SPL */ +#define CONFIG_SPL_STACK 0x218000 #define CONFIG_SPL_BSS_START_ADDR 0x20000000 #define CONFIG_SYS_SPL_MALLOC_START 0x20080000 #define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000 diff --git a/include/configs/sama5d2_icp.h b/include/configs/sama5d2_icp.h index bd24d5743d45..09cc53ef122e 100644 --- a/include/configs/sama5d2_icp.h +++ b/include/configs/sama5d2_icp.h @@ -18,12 +18,9 @@ #define CONFIG_SYS_SDRAM_BASE 0x20000000 #define CONFIG_SYS_SDRAM_SIZE 0x20000000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_INIT_SP_ADDR 0x218000 -#else +#define CONFIG_SPL_STACK 0x218000 #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE) -#endif #ifdef CONFIG_SD_BOOT /* u-boot env in sd/mmc card */ diff --git a/include/configs/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h index c4774db89e7d..99bc2a162316 100644 --- a/include/configs/sama5d2_xplained.h +++ b/include/configs/sama5d2_xplained.h @@ -11,14 +11,11 @@ #include "at91-sama5_common.h" -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_INIT_SP_ADDR 0x218000 -#else #define CONFIG_SYS_INIT_SP_ADDR \ (0x22000000 + 16 * 1024 - GENERATED_GBL_DATA_SIZE) -#endif /* SPL */ +#define CONFIG_SPL_STACK 0x218000 #define CONFIG_SPL_BSS_START_ADDR 0x20000000 #define CONFIG_SYS_SPL_MALLOC_START 0x20080000 #define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000 diff --git a/include/configs/sama5d3_xplained.h b/include/configs/sama5d3_xplained.h index d59b8b138aae..6f5fb994e0fa 100644 --- a/include/configs/sama5d3_xplained.h +++ b/include/configs/sama5d3_xplained.h @@ -27,12 +27,9 @@ #define CONFIG_SYS_SDRAM_BASE 0x20000000 #define CONFIG_SYS_SDRAM_SIZE 0x10000000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_INIT_SP_ADDR 0x318000 -#else +#define CONFIG_SPL_STACK 0x318000 #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE) -#endif /* NAND flash */ #ifdef CONFIG_CMD_NAND diff --git a/include/configs/sama5d3xek.h b/include/configs/sama5d3xek.h index dabbe73e6469..28493dc377cf 100644 --- a/include/configs/sama5d3xek.h +++ b/include/configs/sama5d3xek.h @@ -38,12 +38,9 @@ #define CONFIG_SYS_SDRAM_BASE 0x20000000 #define CONFIG_SYS_SDRAM_SIZE 0x20000000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_INIT_SP_ADDR 0x318000 -#else +#define CONFIG_SPL_STACK 0x318000 #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE) -#endif /* SerialFlash */ diff --git a/include/configs/sama5d4_xplained.h b/include/configs/sama5d4_xplained.h index 74213203454b..2839a12061a8 100644 --- a/include/configs/sama5d4_xplained.h +++ b/include/configs/sama5d4_xplained.h @@ -15,12 +15,9 @@ #define CONFIG_SYS_SDRAM_BASE 0x20000000 #define CONFIG_SYS_SDRAM_SIZE 0x20000000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_INIT_SP_ADDR 0x218000 -#else +#define CONFIG_SPL_STACK 0x218000 #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE) -#endif /* NAND flash */ #ifdef CONFIG_CMD_NAND diff --git a/include/configs/sama5d4ek.h b/include/configs/sama5d4ek.h index b34d6c72641b..b8b6ad27786c 100644 --- a/include/configs/sama5d4ek.h +++ b/include/configs/sama5d4ek.h @@ -15,12 +15,9 @@ #define CONFIG_SYS_SDRAM_BASE 0x20000000 #define CONFIG_SYS_SDRAM_SIZE 0x20000000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_INIT_SP_ADDR 0x218000 -#else +#define CONFIG_SPL_STACK 0x218000 #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE) -#endif /* NAND flash */ #ifdef CONFIG_CMD_NAND diff --git a/include/configs/sama7g5ek.h b/include/configs/sama7g5ek.h index bca7166cb9bc..9bb4a09895af 100644 --- a/include/configs/sama7g5ek.h +++ b/include/configs/sama7g5ek.h @@ -16,12 +16,9 @@ #define CONFIG_SYS_SDRAM_BASE 0x60000000 #define CONFIG_SYS_SDRAM_SIZE 0x20000000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_INIT_SP_ADDR 0x218000 -#else +#define CONFIG_SPL_STACK 0x218000 #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_SDRAM_BASE + 16 * 1024 + CONFIG_SYS_MALLOC_F_LEN - \ GENERATED_GBL_DATA_SIZE) -#endif #endif diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h index 64b55a251d71..3b2803f033a0 100644 --- a/include/configs/smartweb.h +++ b/include/configs/smartweb.h @@ -104,9 +104,6 @@ \ "mtdparts="CONFIG_MTDPARTS_DEFAULT"\0" -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_INIT_SP_ADDR 0x301000 -#else /* * Initial stack pointer: 4k - GENERATED_GBL_DATA_SIZE in internal SRAM, * leaving the correct space for initial global data structure above that @@ -114,10 +111,10 @@ */ #define CONFIG_SYS_INIT_SP_ADDR \ (ATMEL_BASE_SRAM1 + 0x1000 - GENERATED_GBL_DATA_SIZE) -#endif /* Defines for SPL */ +#define CONFIG_SPL_STACK 0x301000 #define CONFIG_SPL_BSS_START_ADDR CONFIG_SYS_SDRAM_BASE #define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SPL_BSS_START_ADDR + \ CONFIG_SPL_BSS_MAX_SIZE) diff --git a/include/configs/socfpga_soc64_common.h b/include/configs/socfpga_soc64_common.h index c399ba36c087..022e0881cb3b 100644 --- a/include/configs/socfpga_soc64_common.h +++ b/include/configs/socfpga_soc64_common.h @@ -29,14 +29,8 @@ */ #define CONFIG_SYS_INIT_RAM_ADDR 0xFFE00000 #define CONFIG_SYS_INIT_RAM_SIZE 0x40000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR \ - + CONFIG_SYS_INIT_RAM_SIZE \ - - SOC64_HANDOFF_SIZE) -#else #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE \ + 0x100000) -#endif #define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_INIT_SP_ADDR) /* @@ -153,7 +147,9 @@ unsigned int cm_get_l4_sys_free_clk_hz(void); * */ #define CONFIG_SPL_TARGET "spl/u-boot-spl-dtb.hex" -#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR +#define CONFIG_SPL_STACK (CONFIG_SYS_INIT_RAM_ADDR \ + + CONFIG_SYS_INIT_RAM_SIZE \ + - SOC64_HANDOFF_SIZE) #define CONFIG_SPL_BSS_START_ADDR (PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE \ - CONFIG_SPL_BSS_MAX_SIZE) #define CONFIG_SYS_SPL_MALLOC_SIZE (CONFIG_SYS_MALLOC_LEN) diff --git a/include/configs/stm32f746-disco.h b/include/configs/stm32f746-disco.h index 261e4c8b5ad1..3ce8c786abff 100644 --- a/include/configs/stm32f746-disco.h +++ b/include/configs/stm32f746-disco.h @@ -39,9 +39,6 @@ "ramdisk_addr_r=0xC0438000\0" \ BOOTENV -/* For SPL */ -#ifdef CONFIG_SUPPORT_SPL -#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR #define CONFIG_SYS_MONITOR_LEN (512 * 1024) #define CONFIG_SYS_SPL_LEN 0x00008000 #define CONFIG_SYS_UBOOT_START 0x080083FD @@ -51,8 +48,6 @@ /* DT blob (fdt) address */ #define CONFIG_SYS_FDT_BASE (CONFIG_SYS_FLASH_BASE + \ 0x1C0000) -#endif -/* For SPL ends */ /* For splashcreen */ -- 2.25.1