CPCI-405 port (PPC405GP)

Dan Malek dan at mvista.com
Thu Sep 20 04:10:38 EST 2001


Tom Rini wrote:

> Sounds like a good idea.  Also, doing inline ... __init is rather silly.
> How's the idea sound Dan?

The idea is OK, but I would prefer a different implementation.  You
are trying to do basically the same thing as all of the boards that
use versions of OpenPIC, EPIC, etc.  Rather than have a fixed size
array, and fill most of it with zero, a generic solution should be
able to work with variable sized arrays......just pass the size
somehow. The sizeof() works pretty well for this :-).  The boards
initialize the array to whatever they need, and don't have to worry
about others.

> Well, do you forsee the need to put in board-specific defines?

This isn't the right way.  If you notice the way the ports work,
everything 4xx (or 8xx, or 6xx, or whatever), include the single
header file, in this case ppc4xx.h.  This include file will select
the proper board specific file.  The board specific file, contains,
well, the stuff specific to a board.

Thanks.


	-- Dan

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





More information about the Linuxppc-embedded mailing list