[U-Boot] [RFC] initcall mechanism introduction

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sun May 24 17:04:44 CEST 2009


On 16:57 Sun 24 May     , Wolfgang Denk wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
> 
> In message <20090524120041.GG26561 at game.jcrosoft.org> you wrote:
> >
> > > What sort of benefit do you expect?
> > simplify the code, reduce the number of ifdef
> > reduce the size of U-Boot etc...
> 
> How would that reduce the size of the code?
just as example remove the weak function will reduce the code
as show in the patch 3 just re-implement it through it will reduce the
size by 2KiB.
> 
> > I do have some test and I've gain between 2KiB and more than 10KiB
> > by using this
> 
> And, does it still work on all boards?
for my current test more api you use more you win
as I've not test on all boards I can not certify it
> 
> > so yes I think it's great winn
> 
> I think you don't understand the complexity yet. One problem we  have
> to  solve  is  to make sure we have a very specific sequence in which
> the init routines are run. The original idea of the code was that you
> can #define the init_sequence[] table in an architecture and/or board
> config file; it's just that nobody implemented that yet.
> 
> If you changed the code in this direction, then this might actually
> make sense.
no with initcalls you will be able to do it
as it will be a matter of at which state you want to init your code
so each arch will be able to specify it and you will be able to also add
specific init level on need
we are not forced to have the same lds for all arch and/or board too
actually I've create only one init.h but we can add a arch specificity

Best Regards,
J.


More information about the U-Boot mailing list