Organisation of 4xx initialization code
Ralph Blach
rblach at intrex.net
Sat Nov 17 23:43:55 EST 2001
Just a note that might influence you. The sprs of each 405 will be the same,
but there is NO gurantee that the DCR, any of them look anything like any
other DCR in any other DCR.
I suggest core, chip, and then platform specfic.
Chip
Paul Mackerras wrote:
> Tom Rini writes:
>
> > > No need - the board's platform_init() can call the processor general
> > > functions if necessary.
> >
> > But why not do this once instead of many times? Right now, each of the
> > 405GP 'board' file would look awful similar. I think what Dan said
>
> As a philosophical thing, I think it is better to give control to the
> platform-specific code early and let it call back to generic stuff.
> This is very much the Linux philosophy - it's basically what Linus did
> with the USB code for instance (the old code worked its way down
> through several layers to the HCI driver, Linus' new code called
> straight into the HCI driver which then called a library of support
> routines).
>
> I think that each platform (ep405, walnut, etc.) should have its own
> platform_init(), and if all that does is ppc405_init(), that's fine.
> The fact that we have board_init() at present suggests that some
> platforms will do more than just ppc405_init. And having a
> platform_init() for each platform is consistent with our approach on
> other platforms as well. Then ppc4xx_setup.c becomes a library of
> pieces of code that can be called or not as appropriate.
>
> Paul.
>
--
Ralph "Chip" Blach
KF4WBK
Chapel Hill, North Carolina
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list