This value is only used before relocation. Move it to the new boardf
struct.

Signed-off-by: Simon Glass <s...@chromium.org>
---

 common/board_f.c                  | 10 +++++-----
 include/asm-generic/global_data.h |  4 ----
 include/board_f.h                 |  4 ++++
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index 71194cccdb5..83f14560cda 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -595,7 +595,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
@@ -685,13 +685,13 @@ static int reloc_bootstage(void)
 #ifdef CONFIG_BOOTSTAGE
        if (gd->flags & GD_FLG_SKIP_RELOC)
                return 0;
-       if (gd->new_bootstage) {
+       if (gd->boardf->new_bootstage) {
                int size = bootstage_get_size();
 
                debug("Copying bootstage from %p to %p, size %x\n",
-                     gd->bootstage, gd->new_bootstage, size);
-               memcpy(gd->new_bootstage, gd->bootstage, size);
-               gd->bootstage = gd->new_bootstage;
+                     gd->bootstage, gd->boardf->new_bootstage, size);
+               memcpy(gd->boardf->new_bootstage, gd->bootstage, size);
+               gd->bootstage = gd->boardf->new_bootstage;
                bootstage_relocate();
        }
 #endif
diff --git a/include/asm-generic/global_data.h 
b/include/asm-generic/global_data.h
index 81becbac2ad..8f88ce09f4a 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -334,10 +334,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
        /**
diff --git a/include/board_f.h b/include/board_f.h
index d9c793fbeb1..1eba236a961 100644
--- a/include/board_f.h
+++ b/include/board_f.h
@@ -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
-- 
2.34.1

Reply via email to