[U-Boot] initcall revisited - A new idea to discuss
Graeme Russ
graeme.russ at gmail.com
Tue Jan 3 22:53:58 CET 2012
Hi Wolfgang,
On Wed, Jan 4, 2012 at 1:44 AM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Graeme,
>
> In message <4F02DA64.60502 at gmail.com> you wrote:
>>
[snip]
> One thing comes to mind: it would be nice if we can find a way that
> the INIT_FUNC definitions behave similar to "weak" functions - if an
> init_func can be redefined / overwritten / modified by board specific
> code we eventually have a very nice way to get rid of the related
> #ifdef's.
Well a lot of the #ifdefs will disappear when the INIT_FUNC macros gets
migrated the the corresponding source files as the Makefile logic will
take care of things for us
I do have in the back of my mind the 'what if' case of the dependencies
needing to be different between two arches or boards, but I really can't
think of a case where this would be the case. I added the 'post-req' to
the macro to allow an init function to be inserted before an existing
function which I think will be the most likely case (initialising
on-board hardware such as an FPGA prior to timer initialisation for
example)
We'll see how it pans out
Regards,
Graeme
More information about the U-Boot
mailing list