[U-Boot] RFC: Aligning arch initialisation sequences

Wolfgang Denk wd at denx.de
Sun Nov 14 10:07:42 CET 2010


Dear Reinhard Meyer,

In message <4CDF6070.20503 at emk-elektronik.de> you wrote:
> Dear Wolfgang Denk,
> > Yes, and this is correct. board_init_f != board_early_init_f
> 
> To make it crystal clear now:
> 
> void board_init_f (ulong bootflag)

That's not crystal clear at all.  Until now, you've been talking about
board_early_init_f(), and now you suddenly switch to a completey
different function.

> 	bd_t *bd;
> 	init_fnc_t **init_fnc_ptr;
> 	gd_t *id;
> 	ulong addr, addr_sp;
> +	gd_t auto_gd;

And how do we pass around data before relocation? For example, the
serial driver needs information about clock settings to set up the
serial console.

You would have to add lots of return values (some time even return
structs), which then get passed around as arguments - or you would
have to pass around a pointer to GD _before_ that.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
This all sounds complicated, but it mostly does excatly what you  ex-
pect. It's just difficult for us to explain what you expect...
                       - L. Wall & R. L. Schwartz, _Programming Perl_


More information about the U-Boot mailing list