include/asm-ppc/platforms/

Keith Owens kaos at ocs.com.au
Fri Nov 30 09:19:20 EST 2001


On Thu, 29 Nov 2001 08:26:25 -0700,
Tom Rini <trini at kernel.crashing.org> wrote:
>On Thu, Nov 29, 2001 at 10:48:46PM +1100, Paul Mackerras wrote:
>> The only reason for having include/asm-ppc/platforms under
>> include/asm-ppc is so that serial.h can include the right
>> blah_serial.h file.  We can get around that by using
>> early_serial_setup except that that doesn't work if the serial driver
>> is built as a module.  The boot stuff also needs to get at the first
>> serial port but we can manage that by requiring the platform.h file to
>> define e.g. BOOT_SERIAL_ADDRESS, BOOT_SERIAL_REG_SHIFT, etc., if it
>> wants to use a serial port in the boot wrapper.  The boot wrapper code
>> then just does #include <platform.h>.
>
>What would <asm/serial.h> contain here?  Keep in mind that some ports
>'just work' with the default <asm/serial.h>.

The make rules I sent to Paul automatically generate platform.h and
platform_serial.h by copying the platform specific files to arch/ppc
under standard names.  If the platform has no *_serial.h file then
platform_serial.h is a zero length file.  So ppc code can always

#include <platform.h>
#include <platform_serial.h>

without #ifdef in the main code.


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





More information about the Linuxppc-dev mailing list