From patchwork Fri Feb 8 15:12:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,v5,20/23] x86: Adjust board_r.c for x86 Date: Fri, 08 Feb 2013 05:12:16 -0000 From: Simon Glass X-Patchwork-Id: 219195 Message-Id: <1360336339-10703-21-git-send-email-sjg@chromium.org> To: U-Boot Mailing List Cc: Graeme Russ , Tom Rini , Vadim Bendebury For x86 the global_data is managed entirely by the start.S code so we do not need to touch it. However, we do have some more initcalls to add. Signed-off-by: Simon Glass --- Changes in v5: - Add new patch to adjust board_r.c for x86 Changes in v4: None Changes in v3: None Changes in v2: None common/board_r.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/common/board_r.c b/common/board_r.c index 24d8a17..1a26a04 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -63,6 +63,9 @@ #include #endif #include +#ifdef CONFIG_X86 +#include +#endif #include DECLARE_GLOBAL_DATA_PTR; @@ -716,6 +719,9 @@ init_fnc_t init_sequence_r[] = { #ifdef CONFIG_CLOCKS set_cpu_clk_info, /* Setup clock information */ #endif +#ifdef CONFIG_X86 + init_bd_struct_r, +#endif initr_reloc_global_data, initr_serial, initr_announce, @@ -763,11 +769,16 @@ init_fnc_t init_sequence_r[] = { initr_flash, #endif INIT_FUNC_WATCHDOG_RESET -#ifdef CONFIG_PPC +#if defined(CONFIG_PPC) || defined(CONFIG_X86) /* initialize higher level parts of CPU like time base and timers */ cpu_init_r, +#endif +#ifdef CONFIG_PPC initr_spi, #endif +#if defined(CONFIG_X86) && defined(CONFIG_SPI) + init_func_spi, +#endif #ifdef CONFIG_CMD_NAND initr_nand, #endif @@ -821,10 +832,16 @@ init_fnc_t init_sequence_r[] = { #ifdef CONFIG_CMD_KGDB initr_kgdb, #endif +#ifdef CONFIG_X86 + board_early_init_r, +#endif interrupt_init, -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM) || defined(CONFIG_x86) initr_enable_interrupts, #endif +#ifdef CONFIG_X86 + timer_init, /* initialize timer */ +#endif #if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) initr_status_led, #endif @@ -886,7 +903,9 @@ init_fnc_t init_sequence_r[] = { void board_init_r(gd_t *new_gd, ulong dest_addr) { +#ifndef CONFIG_X86 gd = new_gd; +#endif if (initcall_run_list(init_sequence_r)) hang();