[U-Boot] [RFC] initcall mechanism introduction

Scott Wood scottwood at freescale.com
Tue May 26 23:00:46 CEST 2009


On Sun, May 24, 2009 at 04:57:25PM +0200, Wolfgang Denk wrote:
> 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.

IMHO, it is much better for the information on what needs to be run on
init to reside in the file that needs to be called, rather than copied to
a bunch of different arch files.

In what practical case would one arch want to run component X before
component Y, but another want to run component Y before component X?  If
component X is always supposed to come before component Y, that can be
done with different levels of initcalls, or just by arranging the
makefiles appropriately (with a comment warning people not to change it).

> If you changed the code in this direction, then this might actually
> make sense.
> 
> The Linux way of doing initcalls is useless for U-Boot, as it addres-
> ses a completely different problem  and  is  based  on  a  completely
> different memory management model.

Initcalls are not the same thing as init code/data (other than the
coincidence that in Linux, they would typically reside in such sections). 

This has nothing to do with memory management.

-Scott


More information about the U-Boot mailing list