[U-Boot] [PATCH 1/2] ARM: introduce arch_early_init_r()

Graeme Russ graeme.russ at gmail.com
Tue Apr 3 01:05:31 CEST 2012


Hi Tom,

On Tue, Apr 3, 2012 at 8:15 AM, Tom Rini <trini at ti.com> wrote:
> On Mon, Apr 02, 2012 at 06:19:45PM -0300, Fabio Estevam wrote:
>
>> Introduce arch_early_init_r() function, which can be useful for doing
>> early initialization after relocation has happened.
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> [snip]
>> +#ifdef CONFIG_ARCH_EARLY_INIT_R
>> +     arch_early_init_r();
>> +#endif
>
> We never check return status, make this a void?  As Wolfgang has said
> before, just because the other examples do things wrong doesn't mean we
> should keep doing it :)

The INIT_FUNC patch series will require that the board_init...() functions
get flattened to simply processing loops and all of these extra functions
that have crept in outside those loops be moved into the init arrays.

Have a look at arch/x86/lib/board.c for reference

Defining these functions as returning int with no parameters will make
that work a lot easier

Regards,

Graeme


More information about the U-Boot mailing list