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

Heiko Schocher
2010-09-19T06:04:26Z

Hello Wolfgang,

Wolfgang Denk wrote:
> Dear Albert ARIBAUD,
>
> In message <4C953EC4.2090604@free.fr> you wrote:
>>> +#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
>
> Good question...
>
>> 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?
>
> I2C may be needed for example if you have the environment stored in a
> I2C EEPROM - but then this is needed before init_baudrate ...

or for reading SPD EEprom for DDR setup ...

> CONFIG_PCI - I don't think this is used at all by any ARM board yet.
>
>
> My understanding is that Heiko might be preparing arch/arm/lib/board.c
> for merging with arch/powerpc/lib/board.c ...

Indeed, I copied this from arch/powerpc/lib/board.c and added
arm specific code. I think goal should be, that we can make a
arch/generic/lib/board.c ... ?

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany