Patchwork [U-Boot,v2,08/17] x86: Set GD_FLG_RELOC after entering in-RAM copy of U-Boot

login
register
mail settings
Submitter Graeme Russ
Date Jan. 4, 2012, 7:59 p.m.
Message ID <1325707195-3218-8-git-send-email-graeme.russ@gmail.com>
Download mbox | patch
Permalink /patch/134344/
State Awaiting Upstream
Delegated to: Graeme Russ
Headers show

Comments

Graeme Russ - Jan. 4, 2012, 7:59 p.m.
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
---
Changes for v2:
 - None

 arch/x86/lib/board.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

--
1.7.5.2.317.g391b14
Simon Glass - Jan. 12, 2012, 4:51 a.m.
On Wed, Jan 4, 2012 at 11:59 AM, Graeme Russ <graeme.russ@gmail.com> wrote:
> Signed-off-by: Graeme Russ <graeme.russ@gmail.com>

Acked-by: Simon Glass <sjg@chromium.org>

> ---
> Changes for v2:
>  - None
>
>  arch/x86/lib/board.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c
> index b64c2d3..3d82165 100644
> --- a/arch/x86/lib/board.c
> +++ b/arch/x86/lib/board.c
> @@ -252,8 +252,6 @@ void board_init_f(ulong boot_flags)
>                        hang();
>        }
>
> -       gd->flags |= GD_FLG_RELOC;
> -
>        /*
>         * SDRAM is now initialised, U-Boot has been copied into SDRAM,
>         * the BSS has been cleared etc. The final stack can now be setup
> @@ -322,6 +320,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
>        /* compiler optimization barrier needed for GCC >= 3.4 */
>        __asm__ __volatile__("" : : : "memory");
>
> +       gd->flags |= GD_FLG_RELOC;
> +
>        gd->bd = &bd_data;
>        memset(gd->bd, 0, sizeof(bd_t));
>        show_boot_progress(0x22);
> --
> 1.7.5.2.317.g391b14
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

Patch

diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c
index b64c2d3..3d82165 100644
--- a/arch/x86/lib/board.c
+++ b/arch/x86/lib/board.c
@@ -252,8 +252,6 @@  void board_init_f(ulong boot_flags)
 			hang();
 	}

-	gd->flags |= GD_FLG_RELOC;
-
 	/*
 	 * SDRAM is now initialised, U-Boot has been copied into SDRAM,
 	 * the BSS has been cleared etc. The final stack can now be setup
@@ -322,6 +320,8 @@  void board_init_r(gd_t *id, ulong dest_addr)
 	/* compiler optimization barrier needed for GCC >= 3.4 */
 	__asm__ __volatile__("" : : : "memory");

+	gd->flags |= GD_FLG_RELOC;
+
 	gd->bd = &bd_data;
 	memset(gd->bd, 0, sizeof(bd_t));
 	show_boot_progress(0x22);