All of lore.kernel.org
 help / color / mirror / Atom feed
From: Graeme Russ <graeme.russ@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] New init sequence processing without init_sequence array
Date: Tue, 23 Aug 2011 10:17:01 +1000	[thread overview]
Message-ID: <CALButC+odU8saFo9rjNNz0+yfvsod=keVb04GKNpotzOQYG4iw@mail.gmail.com> (raw)
In-Reply-To: <20110822201023.0F8A111EF9D9@gemini.denx.de>

Hi Wolfgang,

On Tue, Aug 23, 2011 at 6:10 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Graeme Russ,
>
> In message <1313587343-3693-1-git-send-email-graeme.russ@gmail.com> you wrote:
>> I have been thinking about the problem of the pesky init_sequence arrays
>> and the inevitable #ifdefs and empty stub functions that result so I
>> thought I'de have a crack at a more dynamic implementation. And like all
>> good programmers, I stole the solution ;). This implementation is based
>> on Linux's __initcall(fn) et. al. macros
>>
>> If this works cross-platform, we can finally move board_init_* into
>> /lib/ - Wouldn't that be nice
>>
>> Thoughts?

>   I explained this a number of times before: the current code was
>   designed to allow even for completely board specific init
>   sequences, by simply adding #define for the list of init functions
>   to the board config file - see for example here:
>
>   http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/33951/focus=36436
>
>   http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/72131/focus=72136

Hmm, this last thread includes this little gem:

http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/72131/focus=72136

<quote>
Somewhat offtopic, but you could add a few weak empty dummy functions at
strategic places in the board_X funcs. Any board that needs some extra
init sequence could define the appropriate function which will replace
the weak one.
</quote>

There is an incling that there may be a requirement to have more
flexibility in the init sequence at the board level. Your response here:

http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/72131/focus=72136

<quote>
The idea is that boards that want such contrrol can redefine the whole
init sequence list - adding what they really need, and omitting what they
don't. Zero overhead.
</quote>

I would agree with Detlev - For a board to redefine the entire init
sequence just to inject a single init function seems like gross overkill.
Of course, this has already been realised and the solution was to #ifdef
the init sequence array itself.

I think we are starting to see that the init array methodology is getting
a little restrictive and in order to break free, some rather unsavoury
coding behaviour has started to creep in

Regards,

Graeme

  parent reply	other threads:[~2011-08-23  0:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-17 13:22 [U-Boot] [RFC] New init sequence processing without init_sequence array Graeme Russ
2011-08-22 20:10 ` Wolfgang Denk
2011-08-22 23:20   ` Graeme Russ
2011-08-23 11:49     ` Wolfgang Denk
2011-08-23 23:20       ` Graeme Russ
2011-08-24  5:38         ` Wolfgang Denk
2011-08-24  5:57           ` Graeme Russ
2011-08-24  6:48             ` Wolfgang Denk
2011-08-24  7:06               ` Graeme Russ
2011-08-24 12:49                 ` Wolfgang Denk
2011-08-24 12:56                   ` Graeme Russ
2011-08-24 13:24                     ` Wolfgang Denk
2011-08-24 13:58                       ` Graeme Russ
2011-08-24 23:00                         ` Graeme Russ
2011-08-24 23:41                           ` Simon Glass
2011-08-25  2:45                             ` Graeme Russ
2011-08-24 13:46               ` Detlev Zundel
2011-08-23  0:17   ` Graeme Russ [this message]
2011-08-23  1:00   ` Mike Frysinger
2011-08-23  1:10     ` Graeme Russ
2011-08-23 11:52     ` Wolfgang Denk

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='CALButC+odU8saFo9rjNNz0+yfvsod=keVb04GKNpotzOQYG4iw@mail.gmail.com' \
    --to=graeme.russ@gmail.com \
    --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.