early kernel serial port fun (not)

Jim Thompson jim at musenki.com
Tue Jan 29 06:13:22 EST 2002


I'm working at getting the on-board serial port(s) on a MPC8245
working on a Sandpoint X3 platform.

Things boot just fine when using the 'normal' UARTs (on the Sandpoint

I've got the on-chip serial ports enabled in ppcboot.  I tftp my
kernel in, and boot it, but things seem to go wrong soon after the
text pages are mapped.

The on-chip serial port is at 0xfc004500 (the 2nd one is at

## Booting image at 00100000 ...
   Image Name:   sandpoint 2.4.14 test
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    648565 Bytes = 633 kB = 0 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
id mach(): doneMMU:enterMMU:hw initMMU:mapinMMU:setioMMU:exitMMU

Obviously, I've set 'CONFIG_SERIAL_TEXT_DEBUG' to get even this.

Below is the hacked sandpoint_serial.h  (I'll make it pretty after it

Does anyone have clue to offer here?


(p.s. for those of you wondering why the on-X3 serial ports aren't
 good enough, I have an 8245 board that uses the on-chip ones. The
 next step is to get linux running on the musenki board, thus the
 experimentation on 'known/working' hardware.)

 * include/asm-ppc/sandpoint_serial.h
 * Definitions for Motorola SPS Sandpoint Test Platform
 * Author: Mark A. Greer
 *         mgreer at mvista.com
 * Copyright 2001 MontaVista Software Inc.
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of  the GNU General  Public License as published by the
 * Free Software Foundation;  either version 2 of the  License, or (at your
 * option) any later version.


#include <linux/config.h>

#if 0 /* normal serial port support */
#define SANDPOINT_SERIAL_0		0xfe0003f8
#define SANDPOINT_SERIAL_1		0xfe0002f8

#define RS_TABLE_SIZE  64
#define RS_TABLE_SIZE  2

/* Rate for the 1.8432 Mhz clock for the onboard serial chip */
#define BASE_BAUD ( 1843200 / 16 )


        { 0, BASE_BAUD, SANDPOINT_SERIAL_0, 4, STD_COM_FLAGS, /* ttyS0 */ \
		iomem_base: (u8 *)SANDPOINT_SERIAL_0,			  \
		io_type: SERIAL_IO_MEM },				  \
        { 0, BASE_BAUD, SANDPOINT_SERIAL_1, 3, STD_COM_FLAGS, /* ttyS1 */ \
		iomem_base: (u8 *)SANDPOINT_SERIAL_1,			  \
		io_type: SERIAL_IO_MEM },

#else /* use on-chip DUART */

#define RS_TABLE_SIZE 1
#define BASE_BAUD ( 100000000 / 16 )
#define DUART0 0xfc004500
        { 0, BASE_BAUD, DUART0, 21, STD_COM_FLAGS, /* ttyS0 */ \
		iomem_base: (u8 *)DUART0,		  \
		io_type: SERIAL_IO_MEM },




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

More information about the Linuxppc-embedded mailing list