]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: Use CONFIG_SPL_STACK or CONFIG_SYS_INIT_SP_ADDR directly.
authorTom Rini <trini@konsulko.com>
Tue, 24 May 2022 17:11:41 +0000 (13:11 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 6 Jun 2022 16:09:12 +0000 (12:09 -0400)
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 <trini@konsulko.com>
15 files changed:
include/configs/imxrt1020-evk.h
include/configs/imxrt1050-evk.h
include/configs/sam9x60_curiosity.h
include/configs/sama5d27_som1_ek.h
include/configs/sama5d27_wlsom1_ek.h
include/configs/sama5d2_icp.h
include/configs/sama5d2_xplained.h
include/configs/sama5d3_xplained.h
include/configs/sama5d3xek.h
include/configs/sama5d4_xplained.h
include/configs/sama5d4ek.h
include/configs/sama7g5ek.h
include/configs/smartweb.h
include/configs/socfpga_soc64_common.h
include/configs/stm32f746-disco.h

index 79feab389e322fa739cde0a39adfa8bec5db992b..afae6a4e387a23bb05a9b5bfcc6f6651b34bc488 100644 (file)
  * 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 */
index 5c2f975ba7f0acaa3fbd1b4bab66e75e1b71fcff..4b341a349c2fca7bea621a058afd71cb79cbc867 100644 (file)
  * 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 */
index 2708711a4ebc2291d83543a62efd87117545340e..aa3feb4a367dc4eceb2ff97991c954d65e2f5eb5 100644 (file)
 #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
index eb29f211ef0120cb07d3edc3a1e751b5bca79bbc..933dcace9d77e9ba30b4f662a97e4b0c0b854f35 100644 (file)
 #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
index 54ef48ce3edb0fe64f445316d58c8d9efc5e9664..9bf7016acaf001d4f6f39108e3e6626f4d03e68f 100644 (file)
 #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
index bd24d5743d459825495e37cb0e59f0996c5f7d5c..09cc53ef122eee9b9ad1f9fbd4fd43e9052563f5 100644 (file)
 #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 */
index c4774db89e7d741842c834a142274cd3d1a49cfc..99bc2a1623160861827201a65be0dd9e5d2fcbc5 100644 (file)
 
 #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
index d59b8b138aae0bb1fa843ac1d7e92a4d9c5ed274..6f5fb994e0fa80a3c70678c7634319bb1a8c2e01 100644 (file)
 #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
index dabbe73e6469b6c3a883def10a7e151a2cf9fe02..28493dc377cf4118ecec9ab118c04344645ebe20 100644 (file)
 #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 */
 
index 74213203454badd8d4fd1599ec0cf63331b49c95..2839a12061a829bf02261617992c2cc0f6183447 100644 (file)
 #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
index b34d6c72641b807e7745bb3ee85301ebf1a4b2fd..b8b6ad27786c24093ee2bf427d08d4a3d52c84b9 100644 (file)
 #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
index bca7166cb9bcc501196579536a4e70b5ec816dcf..9bb4a09895af7f3e80c3bb4faa8015c8b8ca949f 100644 (file)
 #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
index 64b55a251d71aa7f572185c54730c5677bd8867f..3b2803f033a0ce2f91f94fa78b48eb9afa26ad04 100644 (file)
                                                                        \
        "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
  */
 #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)
index c399ba36c0879d7c239f57dbe819e2deb9dbb0fc..022e0881cb3bb1f755fe73dc36ab5e9204e9a06c 100644 (file)
  */
 #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)
index 261e4c8b5ad1ca2621c553904524177aa4b44805..3ce8c786abff70a48a4a5c9667ba0ece9c7d051b 100644 (file)
@@ -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 */