Patchwork [U-Boot,RFC,33/36] x86 - Rearrange function calls in board_init_f

login
register
mail settings
Submitter Graeme Russ
Date Jan. 3, 2011, 7:46 p.m.
Message ID <1294084016-2674-34-git-send-email-graeme.russ@gmail.com>
Download mbox | patch
Permalink /patch/77339/
State Superseded
Delegated to: Graeme Russ
Headers show

Comments

Graeme Russ - Jan. 3, 2011, 7:46 p.m.
---
 arch/i386/lib/board.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

--
1.7.1.422.g049e9

Patch

diff --git a/arch/i386/lib/board.c b/arch/i386/lib/board.c
index abd0551..35d7afd 100644
--- a/arch/i386/lib/board.c
+++ b/arch/i386/lib/board.c
@@ -237,6 +237,14 @@  static int do_elf_reloc_fixups(void)
  */
 void board_init_f (ulong boot_flags)
 {
+	/* First stage CPU initialization */
+	if (cpu_init_f() != 0)
+		hang();
+
+	/* First stage Board initialization */
+	if (board_early_init_f() != 0)
+		hang();
+
 	if (env_init() != 0)
 		hang();

@@ -255,14 +263,6 @@  void board_init_f (ulong boot_flags)
 	if (calculate_relocation_address() != 0)
 		hang();

-	/* First stage CPU initialization */
-	if (cpu_init_f() != 0)
-		hang();
-
-	/* First stage Board initialization */
-	if (board_early_init_f() != 0)
-		hang();
-
 	/* Copy U-Boot into RAM */
 	if (copy_uboot_to_ram() != 0)
 		hang();