From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] initcall mechanism introduction
Date: Wed, 27 May 2009 10:12:21 +0200 [thread overview]
Message-ID: <200905271012.21971.sr@denx.de> (raw)
In-Reply-To: <20090527095235.78e24b0d@hskinnemoen-d830>
On Wednesday 27 May 2009 09:52:35 Haavard Skinnemoen wrote:
> 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.
ACK. Most of this code was added a long time ago. We wouldn't accept this
board specific "hacks" (especially in lib_ppc/board.c) in the common code
right now any more.
> - 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.
Yes, I noticed this while moving the malloc initialisation to an earlier
stage. It would be really a great improvement if we could consolidate those
lib_arch/board.c implementations somehow.
> 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.
ACK. Even though I don't have a clue right now how this could be accomplished
in practise without breaking some of the (old) board ports.
Nevertheless I think that Jean-Christophe's inicall approach is a good idea
which could/should be used here.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2009-05-27 8:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-23 15:05 [U-Boot] [RFC] initcall mechanism introduction Jean-Christophe PLAGNIOL-VILLARD
[not found] ` <1243091325-27683-1-git-send-email-plagnioj@jcrosoft.com>
2009-05-23 15:08 ` [U-Boot] [PATCH 2/3] arm: add initcalls_init Jean-Christophe PLAGNIOL-VILLARD
2009-05-23 15:08 ` [U-Boot] [PATCH 3/3] net: switch device init to initcall Jean-Christophe PLAGNIOL-VILLARD
2009-05-23 15:41 ` Ben Warren
2009-05-23 16:36 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-23 18:26 ` Wolfgang Denk
2009-05-23 18:31 ` Ben Warren
2009-05-23 18:19 ` [U-Boot] [RFC] initcall mechanism introduction Wolfgang Denk
2009-05-24 12:00 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-24 14:57 ` Wolfgang Denk
2009-05-24 15:04 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-24 17:05 ` Wolfgang Denk
2009-05-26 21:00 ` Scott Wood
2009-05-26 21:54 ` Wolfgang Denk
2009-05-26 22:07 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-26 22:25 ` Wolfgang Denk
2009-05-26 22:20 ` Scott Wood
2009-05-26 22:28 ` Wolfgang Denk
2009-05-27 7:52 ` Haavard Skinnemoen
2009-05-27 8:12 ` Stefan Roese [this message]
2009-05-27 18:48 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200905271012.21971.sr@denx.de \
--to=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.