[U-Boot] [RFC PATCH 01/19] Introduce generic global_data
Andreas Bießmann
andreas.devel at googlemail.com
Thu Dec 29 08:47:14 CET 2011
Dear Simon,
On 28.12.11 07:35, Simon Glass wrote:
> We want to unify the global_data structure. Most fields are common across
> architectures, but there are a fair number of SOC-specific additions. It
> isn't clear how best to deal with these, but for now we just use #ifdef.
I would like to see some more 'clustering' here. Especially the timer
stuff is implementation specific and should therefore not coded directly
but with some pointer to the specific stuff i.e. introduce some timer_t
which is specific for arm in general and maybe has some more
specialization for atmel devices or what else and just save a pointer to
that struct in gd_t like it is done with bd_t.
Well maybe having a pointer here is stated critical so we could just
insert the struct directly and let the compiler decide about the size
(BTW this could be done with bd_t now too cause we have a pre-calculated
size of gd_t since some time, saves some little steps when instantiating
gd_t when running).
Beside that we could also introduce some more structs holding specific
stuff i.e. console_t, reloc_t, ...
(but yes, it should be done in a second step ...)
What do you think about that?
best regards
Andreas Bießmann
More information about the U-Boot
mailing list