[U-Boot] [RFC] initcall mechanism introduction
Haavard Skinnemoen
haavard.skinnemoen at atmel.com
Wed May 27 09:52:35 CEST 2009
Wolfgang Denk wrote:
> > 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).
>
> The problem is that there is no such fix order. It is board dependent.
In other words, what we have right now is the worst of both worlds:
- There are shitloads of #ifdefs in the arch code to cope with
different board requirements.
- There are huge differences between each architecture's init
sequence which makes it hard to write generic code elsewhere, and
hard to maintain each architecture since the init sequence needs to
be changed when new boards add new features, and there's no
"standard" way of doing it so the chances of getting it right to
begin with are very slim.
Also, the chances of getting this mess cleaned up is very slim since
you need to touch all architectures in order to change something.
IMO, introducing a common init sequence for all architectures would be
an important step on the way to make this code somewhat maintainable,
no matter how messy the initial result ends up being. Or perhaps a
better first step would be to clean up the ppc code since it's what new
architectures tend to copy, and it's just such an insane mess right now.
Haavard
More information about the U-Boot
mailing list