x86: Adjust board_r.c for x86
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 <sjg@chromium.org>
This commit is contained in:
		
							parent
							
								
									48a3380675
								
							
						
					
					
						commit
						be274b99ab
					
				|  | @ -63,6 +63,9 @@ | ||||||
| #include <asm/mmu.h> | #include <asm/mmu.h> | ||||||
| #endif | #endif | ||||||
| #include <asm/sections.h> | #include <asm/sections.h> | ||||||
|  | #ifdef CONFIG_X86 | ||||||
|  | #include <asm/init_helpers.h> | ||||||
|  | #endif | ||||||
| #include <linux/compiler.h> | #include <linux/compiler.h> | ||||||
| 
 | 
 | ||||||
| DECLARE_GLOBAL_DATA_PTR; | DECLARE_GLOBAL_DATA_PTR; | ||||||
|  | @ -716,6 +719,9 @@ init_fnc_t init_sequence_r[] = { | ||||||
| 	 */ | 	 */ | ||||||
| #ifdef CONFIG_CLOCKS | #ifdef CONFIG_CLOCKS | ||||||
| 	set_cpu_clk_info, /* Setup clock information */ | 	set_cpu_clk_info, /* Setup clock information */ | ||||||
|  | #endif | ||||||
|  | #ifdef CONFIG_X86 | ||||||
|  | 	init_bd_struct_r, | ||||||
| #endif | #endif | ||||||
| 	initr_reloc_global_data, | 	initr_reloc_global_data, | ||||||
| 	initr_serial, | 	initr_serial, | ||||||
|  | @ -764,11 +770,16 @@ init_fnc_t init_sequence_r[] = { | ||||||
| 	initr_flash, | 	initr_flash, | ||||||
| #endif | #endif | ||||||
| 	INIT_FUNC_WATCHDOG_RESET | 	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 */ | 	/* initialize higher level parts of CPU like time base and timers */ | ||||||
| 	cpu_init_r, | 	cpu_init_r, | ||||||
|  | #endif | ||||||
|  | #ifdef CONFIG_PPC | ||||||
| 	initr_spi, | 	initr_spi, | ||||||
| #endif | #endif | ||||||
|  | #if defined(CONFIG_X86) && defined(CONFIG_SPI) | ||||||
|  | 	init_func_spi, | ||||||
|  | #endif | ||||||
| #ifdef CONFIG_CMD_NAND | #ifdef CONFIG_CMD_NAND | ||||||
| 	initr_nand, | 	initr_nand, | ||||||
| #endif | #endif | ||||||
|  | @ -821,11 +832,17 @@ init_fnc_t init_sequence_r[] = { | ||||||
| 	INIT_FUNC_WATCHDOG_RESET | 	INIT_FUNC_WATCHDOG_RESET | ||||||
| #ifdef CONFIG_CMD_KGDB | #ifdef CONFIG_CMD_KGDB | ||||||
| 	initr_kgdb, | 	initr_kgdb, | ||||||
|  | #endif | ||||||
|  | #ifdef CONFIG_X86 | ||||||
|  | 	board_early_init_r, | ||||||
| #endif | #endif | ||||||
| 	interrupt_init, | 	interrupt_init, | ||||||
| #ifdef CONFIG_ARM | #if defined(CONFIG_ARM) || defined(CONFIG_x86) | ||||||
| 	initr_enable_interrupts, | 	initr_enable_interrupts, | ||||||
| #endif | #endif | ||||||
|  | #ifdef CONFIG_X86 | ||||||
|  | 	timer_init,		/* initialize timer */ | ||||||
|  | #endif | ||||||
| #if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) | #if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) | ||||||
| 	initr_status_led, | 	initr_status_led, | ||||||
| #endif | #endif | ||||||
|  | @ -887,7 +904,9 @@ init_fnc_t init_sequence_r[] = { | ||||||
| 
 | 
 | ||||||
| void board_init_r(gd_t *new_gd, ulong dest_addr) | void board_init_r(gd_t *new_gd, ulong dest_addr) | ||||||
| { | { | ||||||
|  | #ifndef CONFIG_X86 | ||||||
| 	gd = new_gd; | 	gd = new_gd; | ||||||
|  | #endif | ||||||
| 	if (initcall_run_list(init_sequence_r)) | 	if (initcall_run_list(init_sequence_r)) | ||||||
| 		hang(); | 		hang(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue