adding 16550 UART to board(mpc5200)

yc.hahn youngchul.hahn at gmail.com
Thu Nov 27 18:21:09 EST 2008


Hi
I am adding an *add* *additional* UART controller (XR16L2550) to*MPC5200B, *the
board is similar to lite5200b, so I used the linux BSP of Freescale company
provided for lite5200b. Kernel is 2.6.16.Before I add the UART driver(I used
driver/serial/8250.c),  the kernel boots fine, as soon as loading the UART
driver, kernel will hang on "Freeing unused kernel: 100k init".
I defined a structrue in arch/ppc/platform/lite5200.c as:
 static struct plat_serial8250_port serial8250_ports[] = {

[0] = {
.uartclk = 9600*16,
.iotype = UPIO_MEM,
.mapbase = 0xfc000000,
.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SHARE_IRQ,
.irq = MPC52xx_IRQ1,
},
 [1] = {
.uartclk = 9600*16,,
.iotype = UPIO_MEM,
.mapbase = 0xfc000008,
.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SHARE_IRQ,
.irq = MPC52xx_IRQ1,
},
 [2] = {
.uartclk =  9600*16,,
.iotype = UPIO_MEM,
.mapbase = 0xfc000010,
.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SHARE_IRQ,
.irq = MPC52xx_IRQ2,
},
 [3] = {
.uartclk =  9600*16,,
.iotype = UPIO_MEM,
.mapbase = 0xfc000018,
.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SHARE_IRQ,
.irq = MPC52xx_IRQ2,
},
 [4] = {
.uartclk =  9600*16,,
.iotype = UPIO_MEM,
.mapbase = 0xfc000020,
.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SHARE_IRQ,
.irq = MPC52xx_IRQ3,
},
 [5] = {
.uartclk =  9600*16,,
.iotype = UPIO_MEM,
.mapbase = 0xfc000028,
.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SHARE_IRQ,
.irq = MPC52xx_IRQ3,
},
{},
};

static struct platform_device serial8250_device = {
.name = "serial8250",
.id = 0,
.dev.platform_data = serial8250_ports,
};

static int __init
add_serial8250_devices(void)
{
return platform_device_register(&serial8250_device);
}

arch_initcall(add_serial8250_devices);

The boot message is :
FT-Boot 1.2.0 (Sep 17 2008 - 09:16:55)

CPU:   MPC5200 v2.2, Core v1.4 at 462 MHz
       Bus 132 MHz, IPB 132 MHz, PCI 33 MHz
Board: FXALM(mpc52xx)
I2C:   85 kHz, ready
DRAM:  256 MB
FLASH: (Bank#1 - 512 kB, Bank#2 - 16 MB) 16.5 MB
In:    serial
Out:   serial
Err:   serial
Net:   FEC ETHERNET
IDE:   Bus 0: OK
  Device 0: Model: 128MB  ATA Flash Disk Firm: ADAA408J Ser#:
A161112339F000831558
            Type: Hard Disk
            Capacity: 122.1 MB = 0.1 GB (250112 x 512)
Hit any key to stop autoboot:  0
Using FEC ETHERNET device
TFTP from server 192.168.1.40; our IP address is 192.168.1.50
Filename '/tftpboot/uImage'.
Load address: 0x200000
Loading: #################################################################
         #################################################################
         #################################################################
         ########################################################
done
Bytes transferred = 1281939 (138f93 hex)
## Booting image at 00200000 ...
   Image Name:   Linux-2.6.16
   Created:      2008-11-19  19:22:59 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1281875 Bytes =  1.2 MB
   Load Address: 00000000
   Entry Point:  00000000
   Uncompressing Kernel Image ... OK
id mach(): done
MMU:enter
MMU:hw init
MMU:mapin
MMU:setio
MMU:exit
setup_arch: enter
setup_arch: bootmem
arch: exit
bootinfo is find_bootinfo()<5>Linux version 2.6.16
(root at localhost.localdomain) (gcc version 3.4.3) #50 Thu No8
Built 1 zonelists
Kernel command line: console=ttyPSC0,9600 root=/dev/nfs rw
nfsroot=192.168.1.40:/home/hyz/ltib-mpc5200-20070201
PID hash table entries: 2048 (order: 11, 32768 bytes)
Console: colour dummy device 80x25
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 256896k available (1968k kernel code, 664k data, 100k init, 0k
highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16

DMA: MPC52xx BestComm driver
MPC52xx BestComm inited
SCSI subsystem initialized
Installing knfsd (copyright (C) 1996 okir at monad.swb.de).
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0xfc000000 (irq = 6) is a 16550A
serial8250.0: ttyS1 at MMIO 0xfc000008 (irq = 6) is a 16550A
serial8250.0: ttyS2 at MMIO 0xfc000010 (irq = 7) is a 16550A
serial8250.0: ttyS3 at MMIO 0xfc000018 (irq = 7) is a 16550A
serial8250.0: ttyS4 at MMIO 0xfc000020 (irq = 8) is a 16550A
serial8250.0: ttyS5 at MMIO 0xfc000028 (irq = 8) is a 16550A
Serial: MPC52xx PSC driver
ttyPSC0 at MMIO 0xf0002000 (irq = 40) is a MPC52xx PSC
ttyPSC1 at MMIO 0xf0002200 (irq = 41) is a MPC52xx PSC
ttyPSC2 at MMIO 0xf0002400 (irq = 42) is a MPC52xx PSC
ttyPSC3 at MMIO 0xf0002600 (irq = 50) is a MPC52xx PSC
ttyPSC4 at MMIO 0xf0002800 (irq = 51) is a MPC52xx PSC
ttyPSC5 at MMIO 0xf0002c00 (irq = 43) is a MPC52xx PSC
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
ide: MPC52xx IDE/ATA driver
eth0: Phy @ 0x0, type LXT971 (0x001378e2)
hda: 128MB ATA Flash Disk, ATA DISK drive
ide0 at 0xf0003a60-0xf0003a67,0xf0003a5c on irq 46
mpc52xx-ide: Setup successful for ide0 (mem=f0003a00-f0003aff irq=46)
hda: max request size: 128KiB
hda: 250112 sectors (128 MB) w/1KiB Cache, CHS=977/8/32
hda: cache flushes not supported
 hda: hda1
flash chip on the Lite5200/Lite5200B: Found 1 x16 devices at 0x0 in 8-bit
bank
 Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
Creating 1 MTD partitions on "flash chip on the Lite5200/Lite5200B":
0x00000000-0x01000000 : "Filesystem"
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: config: auto-negotiation on, 100HDX, 10HDX.
IP-Config: Complete:
      device=eth0, addr=192.168.1.50, mask=255.255.255.0, gw=192.168.1.1,
     host=192.168.1.50, domain=, nis-domain=(none),
     bootserver=192.168.1.40, rootserver=192.168.1.40, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.40
Looking up port of RPC 100005/1 on 192.168.1.40
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 100k init


Stoping here now~~~, I can't find reason and what I should do?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20081127/b8668cd1/attachment-0001.htm>


More information about the Linuxppc-embedded mailing list