public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] initcall revisited - A new idea to discuss
Date: Fri, 06 Jan 2012 07:35:40 +0100	[thread overview]
Message-ID: <20120106063540.3C5791FD3DA@gemini.denx.de> (raw)
In-Reply-To: <1BAFE6F6C881BF42822005164F1491C305CE73@DBDE01.ent.ti.com>

Dear "Hebbar, Gururaja",

In message <1BAFE6F6C881BF42822005164F1491C305CE73@DBDE01.ent.ti.com> you wrote:
> 
> > Well I kind of like see that a particular init function is explicitly a
> > pre- or post- relocation function. But yes, having barrier pre-requisites
> > would achieve the same effect.

This point of vew is too restricted.  Think of boards that use SPL, or
where a rom boot loader loads U-Boot directory to RAM, or ...

> > SKIP_INIT(foo) simply removes all 'foo' init functions from the list
> > _after_ the list has been created - If this breaks dependencies that's
> > your problem ;). It is up to you as the 'skipper' to make sure that you
> > add init functions to allow things to still work
> 
> Won't this lead to lots of code duplication across all boards, archs. 
> So, tomorrow someone else will send a patch removing duplicate and merging 
> it to a common place. 

I don't see why that would happen?  I see no intention nor any need
for duplicated code.

> So, every board, even under same arch, needs to define its own *complete-set* 
> of INIT_CALL api's. I am dreaming about a lot of MB getting added to u-boot 
> src. 

What makes you think so?

> Just a thought. Why don't split it to ARCH_INIT, BOARD_INIT,. 

Because it's not such an easy split. You can define such groups, like
arch, SoC, board family, board.  But you cannot initialize the system
in such grous - instead, initialization will jump around heavily
between these groups, in a sequence that needs to be well defined, and
that is often diofferent from board to board.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When properly administered, vacations do not  diminish  productivity:
for every week you're away and get nothing done, there's another when
your boss is away and you get twice as much done.  -- Daniel B. Luten

  reply	other threads:[~2012-01-06  6:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-02 11:53 [U-Boot] initcall revisited - A new idea to discuss Graeme Russ
2012-01-02 14:49 ` Wolfgang Denk
2012-01-03 10:37   ` Graeme Russ
2012-01-03 14:44     ` Wolfgang Denk
2012-01-03 21:53       ` Graeme Russ
2012-01-05 22:18       ` Graeme Russ
2012-01-06  4:30         ` Simon Glass
2012-01-06  4:59           ` Graeme Russ
2012-01-06  5:41             ` Hebbar, Gururaja
2012-01-06  6:35               ` Wolfgang Denk [this message]
     [not found]                 ` <1BAFE6F6C881BF42822005164F1491C305D08F@DBDE01.ent.ti.com>
2012-01-07 22:39                   ` Simon Glass
2012-01-08 11:59                     ` Graeme Russ
2012-01-06  6:30             ` Wolfgang Denk
2012-01-03 16:04     ` Simon Glass
2012-01-03 22:36       ` Wolfgang Denk
2012-01-03 22:43         ` Simon Glass

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=20120106063540.3C5791FD3DA@gemini.denx.de \
    --to=wd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox