linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Tom Rini <trini@kernel.crashing.org>
Cc: Matt Porter <mporter@mvista.com>,
	linuxppc-embedded@lists.linuxppc.org,
	Paul Mackerras <paulus@samba.org>
Subject: Re: Organisation of 4xx initialization code
Date: Sat, 17 Nov 2001 11:35:41 +1100	[thread overview]
Message-ID: <20011117113541.E12763@zax> (raw)
In-Reply-To: <20011116085121.D5410@cpe-24-221-152-185.az.sprintbbd.net>


On Fri, Nov 16, 2001 at 08:51:21AM -0700, Tom Rini wrote:
>
> On Fri, Nov 16, 2001 at 04:57:38AM -0700, Matt Porter wrote:
> >
> > On Fri, Nov 16, 2001 at 04:46:26PM +1100, David Gibson wrote:
> > >
> > > At the moment the initialization for each of the 4xx boards goes
> > > through the platform_init() in arch/ppc/kernel/ppc4xx_setup.c, which
> > > in turns calls a board_init() function for the specific board.
> > >
> > > It seems to me that it would make more sense to put platform_init() in
> > > the board specific files, and these functions could then call back,
> > > where appropriate, to generic 4xx setup functions.  This would mean:
> > > 	- It would be easier to support wierd and wacky boards which
> > > have non-standard address setups.
> > > 	- Some ugly #ifdefs in ppc4xx_setup.c could be done away with.
> > > 	- We should be able to remove some inconvenient header
> > > dependencies - at present lots of things are recompiled when board
> > > local defines are changed because walnut.h/ep405.h/etc are included
> > > indirectly in serial.h and some other unexpected places.
> > >
> > > Thoughts?
> >
> > I've been wondering why it's architected that way as well.  It
> > seems you are looking for it to follow the model of the well
> > abstracted 7xx/74xx ports.  Examples are the ones that rely on
> > mpc10x_common and pplus_common as libraries of common initialization
> > code (MEN F1, PCore, MCPN765, MVME5100, etc.).
>
> But that's just it.  Someone else should probably speak up on this, but
> in the 403/405/stb0{3,4}xxx, and possibly 440 when it exists there are
> some things which always exist, depending on processor.  Each 750 board
> for example can really have almost anything attached to it.  But for a
> 405GP, there are known things and some variable things.  I _think_ 4xx
> boards vary more like the 8xx ones do, than 750 does.

Yes, but how the current code tends to make assumptions about how the
onboard devices have been configured by the firmware, and that does
vary from board to board.

Furthermore, it's quite likely IBM will re-use some of the 4xx onboard
peripherals on new 4xx (or even non-4xx) chips, where they could well
be differently organised.  If the board specific code handles the
top-level initialization it will be easier to reuse the code for these
devices.

--
David Gibson			| For every complex problem there is a
david@gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.  -- H.L. Mencken
http://www.ozlabs.org/people/dgibson

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  parent reply	other threads:[~2001-11-17  0:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-16  5:46 Organisation of 4xx initialization code David Gibson
2001-11-16 11:57 ` Matt Porter
2001-11-16 15:51   ` Tom Rini
2001-11-16 16:42     ` Matt Porter
2001-11-16 17:13       ` Tom Rini
2001-11-16 23:24         ` Dan Malek
2001-11-17  0:43           ` David Gibson
2001-11-17  1:01             ` Dan Malek
2001-11-17  2:18             ` Tom Rini
2001-11-17 11:16               ` Paul Mackerras
2001-11-17 12:43                 ` Ralph Blach
2001-11-17 14:46                   ` Mark Pilon
2001-11-17  0:50       ` David Gibson
2001-11-17  2:16         ` Tom Rini
2001-11-17  0:35     ` David Gibson [this message]
2001-11-17  2:18       ` Tom Rini
2001-11-16 16:07   ` Mark Pilon
2001-11-16 17:29     ` Tom Rini
2001-11-16 14:59 ` Tom Rini
2001-11-17  0:40   ` David Gibson
2001-11-17  2:15     ` Tom Rini
2001-11-16 16:46 ` Dan Malek
2001-11-17  0:47   ` David Gibson
2001-11-17  1:11     ` Dan Malek
2001-11-16 17:15 ` Armin Kuster

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=20011117113541.E12763@zax \
    --to=david@gibson.dropbear.id.au \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    --cc=mporter@mvista.com \
    --cc=paulus@samba.org \
    --cc=trini@kernel.crashing.org \
    /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;
as well as URLs for NNTP newsgroup(s).