[U-Boot] [PATCH 12/26 v2][NEXT] ARM: add relocation support

Albert ARIBAUD albert.aribaud at free.fr
Sun Sep 19 00:35:48 CEST 2010


Le 17/09/2010 13:10, Heiko Schocher a écrit :

> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
> index 54519b0..88c6427 100644
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c

> @@ -444,6 +457,459 @@ extern void davinci_eth_set_mac_addr (const u_int8_t *addr);
>
>   	/* NOTREACHED - no way out of command loop except booting */
>   }
> +#else
> +void __dram_init_banksize(void)
> +{
> +	gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
> +	gd->bd->bi_dram[0].size =  gd->ram_size;
> +}
> +void dram_init_banksize(void)
> +	__attribute__((weak, alias("__dram_init_banksize")));
> +
> +init_fnc_t *init_sequence[] = {
> +#if defined(CONFIG_ARCH_CPU_INIT)
> +	arch_cpu_init,		/* basic arch cpu dependent setup */
> +#endif
> +#if defined(CONFIG_BOARD_EARLY_INIT_F)
> +	board_early_init_f,
> +#endif
> +	timer_init,		/* initialize timer */
> +#ifdef CONFIG_FSL_ESDHC
> +	get_clocks,
> +#endif
> +	env_init,		/* initialize environment */
> +	init_baudrate,		/* initialze baudrate settings */
> +	serial_init,		/* serial communications setup */
> +	console_init_f,		/* stage 1 init of console */
> +	display_banner,		/* say that we are here */
> +#if defined(CONFIG_DISPLAY_CPUINFO)
> +	print_cpuinfo,		/* display cpu info (and speed) */
> +#endif
> +#if defined(CONFIG_DISPLAY_BOARDINFO)
> +	checkboard,		/* display board info */
> +#endif
> +#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
> +	init_func_i2c,
> +#endif
> +	dram_init,		/* configure available RAM banks */
> +#if defined(CONFIG_CMD_PCI) || defined (CONFIG_PCI)
> +	arm_pci_init,
> +#endif
> +	NULL,
> +};

Are all these inits really required at board_init_f stage? I understand 
initializing the console in order to print out diagnostic and error 
messages before RAM is initialized, and I understand initializing RAM of 
course, but are I2C or PCI init needed before relocation? Can't they 
wait until board_init_r?

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list