]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board_f: Move new_bootstage to boardf
authorSimon Glass <sjg@chromium.org>
Wed, 21 Aug 2024 16:19:11 +0000 (10:19 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 26 Aug 2024 20:05:38 +0000 (14:05 -0600)
This value is only used before relocation. Move it to the new boardf
struct.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/board_f.c
include/asm-generic/global_data.h
include/board_f.h

index 046d9f45f8bdb4c19f2c342041e329c741e270cc..0c24e3ae618719f86e59125bed92f954b6d9298c 100644 (file)
@@ -596,7 +596,7 @@ static int reserve_bootstage(void)
        int size = bootstage_get_size();
 
        gd->start_addr_sp = reserve_stack_aligned(size);
-       gd->new_bootstage = map_sysmem(gd->start_addr_sp, size);
+       gd->boardf->new_bootstage = map_sysmem(gd->start_addr_sp, size);
        debug("Reserving %#x Bytes for bootstage at: %08lx\n", size,
              gd->start_addr_sp);
 #endif
@@ -686,9 +686,8 @@ static int reloc_bootstage(void)
 #ifdef CONFIG_BOOTSTAGE
        if (gd->flags & GD_FLG_SKIP_RELOC)
                return 0;
-       if (gd->new_bootstage) {
-               bootstage_relocate(gd->new_bootstage);
-       }
+       if (gd->boardf->new_bootstage)
+               bootstage_relocate(gd->boardf->new_bootstage);
 #endif
 
        return 0;
index 325777dc5395639af442889223ef19cb4dbf3706..915dad503a2155ba30fcf992831b4a582ba813e9 100644 (file)
@@ -335,10 +335,6 @@ struct global_data {
         * @bootstage: boot stage information
         */
        struct bootstage_data *bootstage;
-       /**
-        * @new_bootstage: relocated boot stage information
-        */
-       struct bootstage_data *new_bootstage;
 #endif
 #ifdef CONFIG_LOG
        /**
index d9c793fbeb1f89e3098904821a969576639ef14c..1eba236a9614b83f22f2776a0bff29d079992dc6 100644 (file)
@@ -22,6 +22,10 @@ struct board_f {
         * @fdt_size: space reserved for relocated device space
         */
        unsigned long fdt_size;
+       /**
+        * @new_bootstage: relocated boot stage information
+        */
+       struct bootstage_data *new_bootstage;
 };
 
 #endif