Organisation of 4xx initialization code

Matt Porter mporter at mvista.com
Fri Nov 16 22:57:38 EST 2001


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.).

Seems like that would be an improvement for people doing custom
405 ports and ease maintenance of existing ports (especially
the #ifdef creep).

--
Matt Porter
MontaVista Software, Inc.
mporter at mvista.com

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





More information about the Linuxppc-embedded mailing list