All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] Do we really need CONFIG_ARCH_CPU_INIT ?
Date: Thu, 01 Mar 2012 21:48:10 +0100	[thread overview]
Message-ID: <4F4FE08A.8000709@aribaud.net> (raw)
In-Reply-To: <CAOMZO5BgtV61eA3p0hih363QmR4rXbjH09ht=O7727wWb1ok-Q@mail.gmail.com>

Le 01/03/2012 14:23, Fabio Estevam a ?crit :
> Hi,
>
> Currently CONFIG_ARCH_CPU_INIT is used to select arch_cpu_init() function.
>
> arch_cpu_init() does CPU level initialization, so why do we need to
> include CONFIG_ARCH_CPU_INIT in the include/configs/boardXYZ files,
> which are board related files ?
>
> For example:
>
> Let's say boards X, Y and Z are based on SoC S:
>
> 1. If processor S has a arch_cpu_init() defined, then it means that
> X,Y,Z need the code from arch_cpu_init() and then we need to define
> CONFIG_ARCH_CPU_INIT for each of these boards (actually all the boards
> based on this processor would need CONFIG_ARCH_CPU_INIT)
>
> 2. If not all boards need the code inside arch_cpu_init() for
> processor S, then it means that this code is not really CPU specific
> and then it should be moved to board code.

... or some of these boards have a kind of preloader that does CPU level 
inits before U-Boot is loaded, but other have not.

Plus, if a minority of boards for a given SoC can do without the 
arch_cpu_init(), then we'll duplicate code that may well be quite 
identical, won't we?

Amicalement,
-- 
Albert.

  parent reply	other threads:[~2012-03-01 20:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 13:23 [U-Boot] Do we really need CONFIG_ARCH_CPU_INIT ? Fabio Estevam
2012-03-01 13:48 ` Marek Vasut
2012-03-02  7:19   ` Stefan Roese
2012-03-01 20:48 ` Albert ARIBAUD [this message]
2012-03-02  8:46   ` Christian Riesch
2012-03-02  9:41     ` Christian Riesch
2012-03-01 21:28 ` Simon Glass
2012-03-01 22:19   ` Graeme Russ

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=4F4FE08A.8000709@aribaud.net \
    --to=albert.u.boot@aribaud.net \
    --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.