Patchwork [U-Boot,v2,10/17] x86: Allow cache before copy to RAM

login
register
mail settings
Submitter Graeme Russ
Date Jan. 4, 2012, 7:59 p.m.
Message ID <1325707195-3218-10-git-send-email-graeme.russ@gmail.com>
Download mbox | patch
Permalink /patch/134345/
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 |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

--
1.7.5.2.317.g391b14
Simon Glass - Jan. 12, 2012, 4:56 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 |   15 ++++++++++-----
>  1 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c
> index 56acf35..a240d26 100644
> --- a/arch/x86/lib/board.c
> +++ b/arch/x86/lib/board.c
> @@ -131,16 +131,11 @@ init_fnc_t *init_sequence_f[] = {
>        console_init_f,
>        dram_init_f,
>        calculate_relocation_address,
> -       copy_uboot_to_ram,
> -       clear_bss,
> -       do_elf_reloc_fixups,
>
>        NULL,
>  };
>
>  init_fnc_t *init_sequence_r[] = {
> -       copy_gd_to_ram,
> -       init_cache,
>        cpu_init_r,             /* basic cpu dependent setup */
>        board_early_init_r,     /* basic board dependent setup */
>        dram_init,              /* configure available RAM banks */
> @@ -269,6 +264,16 @@ void board_init_f(ulong boot_flags)
>
>  void board_init_f_r(void)
>  {
> +       if (copy_gd_to_ram() != 0)
> +               hang();
> +
> +       if (init_cache() != 0)
> +               hang();
> +
> +       copy_uboot_to_ram();
> +       clear_bss();
> +       do_elf_reloc_fixups();
> +
>        /*
>         * Transfer execution from Flash to RAM by calculating the address
>         * of the in-RAM copy of board_init_r() and calling it
> --
> 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 56acf35..a240d26 100644
--- a/arch/x86/lib/board.c
+++ b/arch/x86/lib/board.c
@@ -131,16 +131,11 @@  init_fnc_t *init_sequence_f[] = {
 	console_init_f,
 	dram_init_f,
 	calculate_relocation_address,
-	copy_uboot_to_ram,
-	clear_bss,
-	do_elf_reloc_fixups,

 	NULL,
 };

 init_fnc_t *init_sequence_r[] = {
-	copy_gd_to_ram,
-	init_cache,
 	cpu_init_r,		/* basic cpu dependent setup */
 	board_early_init_r,	/* basic board dependent setup */
 	dram_init,		/* configure available RAM banks */
@@ -269,6 +264,16 @@  void board_init_f(ulong boot_flags)

 void board_init_f_r(void)
 {
+	if (copy_gd_to_ram() != 0)
+		hang();
+
+	if (init_cache() != 0)
+		hang();
+
+	copy_uboot_to_ram();
+	clear_bss();
+	do_elf_reloc_fixups();
+
 	/*
 	 * Transfer execution from Flash to RAM by calculating the address
 	 * of the in-RAM copy of board_init_r() and calling it