trini at kernel.crashing.org
Thu Nov 29 10:51:32 EST 2001
On Wed, Nov 28, 2001 at 05:13:30PM +1100, Paul Mackerras wrote:
> Dan Malek writes:
> > That's a pretty good idea, and I have another one. Name the
> > directory include/asm-ppc/ppc-platforms or something, then
> > have a symbolic link
> > include/asm/platform -> include/asm-ppc/ppc-platforms/<board-file>
> > That way we can just #include <platform.h> instead of having lots
> > of ifdefs in upper level files to determine which one is needed. If
> > we are moving files around, let's have some effect on actually making
> > it easier to use them, too.
> I have figured out a way to do this without too much pain. The idea
> is that we will have platform.h and platform-serial.h be symlinks to
> files in include/asm-ppc/platforms/. The way that I am suggesting
> that we do this is to have special comments in those files (the ones
> in include/asm-ppc/platforms) that say what should be symlinked, like
> this, from include/asm-ppc/platforms/all_ppc_serial.h:
The one thing I don't like about this is that there's a handfull of
platforms which would use the 'all_ppc_serial.h' file.
> The patch below does all this. It does mean that we will need a
> platform header for every platform, and a platform_serial header for
> every platform where we want to use the standard serial driver. As an
> example, I have made an all_ppc_serial.h that contains most of what
> was in serial.h before. In fact, with a bit of care we could make
> serial.h be the symlink.
Well, if I read that mess if #ifdefs, they already are a whole
'serial.h', so lets just do it in one go. :)
Aside from that it looks good.
Tom Rini (TR1265)
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-dev