<span class="Apple-style-span" style="border-collapse: collapse; "><div>Hi</div>I am adding an&nbsp;<span><b>add</b>&nbsp;<b>additional</b>&nbsp;UART controller (XR16L2550) to<b>MPC5200B,&nbsp;</b>the board is similar to&nbsp;<span style="font-weight: bold; ">lite5200b,&nbsp;</span>so I used the linux BSP of Freescale company provided for lite5200b. Kernel is&nbsp;<a href="http://2.6.16." target="_blank" style="color: rgb(17, 65, 112); ">2.6.16.</a>Before I add the UART driver(I used driver/serial/8250.c), &nbsp;the kernel boots fine, as soon as loading the UART driver, kernel will hang on &quot;Freeing unused kernel: 100k init&quot;.</span><div>
<br></div><div><span>I defined a structrue in arch/ppc/platform/lite5200.c as:</span></div><div><span>&nbsp;<span style="border-collapse: collapse; ">static struct plat_serial8250_port serial8250_ports[] = {</span><pre style="white-space: pre-wrap; word-wrap: break-word; ">
</pre></span></div><span style="border-collapse: collapse; "><div><span style="color: rgb(0, 0, 0); "><div><span style="white-space: pre; ">        </span>[0] = {</div><div><span style="white-space: pre; ">                </span>.uartclk = 9600*16,</div>
<div><span style="white-space: pre; ">                </span>.iotype = UPIO_MEM,</div><div><span style="white-space: pre; ">                </span>.mapbase = 0xfc000000,</div><div><span style="white-space: pre; ">                </span>.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SHARE_IRQ,</div>
<div><span style="white-space: pre; ">                </span>.irq<span style="white-space: pre; ">        </span>= MPC52xx_IRQ1,</div><div><span style="white-space: pre; ">                </span>},</div><div><span style="white-space: pre; ">                </span></div>
<div><span style="white-space: pre; ">        </span>[1] = {</div><div><span style="white-space: pre; ">                </span>.uartclk = 9600*16,,</div><div><span style="white-space: pre; ">                </span>.iotype = UPIO_MEM,</div><div><span style="white-space: pre; ">                </span>.mapbase = 0xfc000008,</div>
<div><span style="white-space: pre; ">                </span>.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP |&nbsp;UPF_SHARE_IRQ,</div><div><span style="white-space: pre; ">                </span>.irq<span style="white-space: pre; ">        </span>= MPC52xx_IRQ1,</div>
<div><span style="white-space: pre; ">                </span>},</div><div><span style="white-space: pre; ">                </span></div><div><span style="white-space: pre; ">        </span>[2] = {</div><div><span style="white-space: pre; ">                </span>.uartclk =&nbsp;&nbsp;9600*16,,</div>
<div><span style="white-space: pre; ">                </span>.iotype = UPIO_MEM,</div><div><span style="white-space: pre; ">                </span>.mapbase = 0xfc000010,</div><div><span style="white-space: pre; ">                </span>.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP&nbsp;|&nbsp;UPF_SHARE_IRQ,</div>
<div><span style="white-space: pre; ">                </span>.irq<span style="white-space: pre; ">        </span>= MPC52xx_IRQ2,</div><div><span style="white-space: pre; ">                </span>},</div><div><span style="white-space: pre; ">                </span></div>
<div><span style="white-space: pre; ">        </span>[3] = {</div><div><span style="white-space: pre; ">                </span>.uartclk =&nbsp;&nbsp;9600*16,,</div><div><span style="white-space: pre; ">                </span>.iotype = UPIO_MEM,</div><div><span style="white-space: pre; ">                </span>.mapbase = 0xfc000018,</div>
<div><span style="white-space: pre; ">                </span>.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP&nbsp;|&nbsp;UPF_SHARE_IRQ,</div><div><span style="white-space: pre; ">                </span>.irq<span style="white-space: pre; ">        </span>= MPC52xx_IRQ2,</div>
<div><span style="white-space: pre; ">                </span>},</div><div><span style="white-space: pre; ">                </span></div><div><span style="white-space: pre; ">        </span>[4] = {</div><div><span style="white-space: pre; ">                </span>.uartclk =&nbsp;&nbsp;9600*16,,</div>
<div><span style="white-space: pre; ">                </span>.iotype = UPIO_MEM,</div><div><span style="white-space: pre; ">                </span>.mapbase = 0xfc000020,</div><div><span style="white-space: pre; ">                </span>.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP&nbsp;|&nbsp;UPF_SHARE_IRQ,</div>
<div><span style="white-space: pre; ">                </span>.irq<span style="white-space: pre; ">        </span>= MPC52xx_IRQ3,</div><div><span style="white-space: pre; ">                </span>},</div><div><span style="white-space: pre; ">        </span></div><div>
<span style="white-space: pre; ">        </span>[5] = {</div><div><span style="white-space: pre; ">                </span>.uartclk =&nbsp;&nbsp;9600*16,,</div><div><span style="white-space: pre; ">                </span>.iotype = UPIO_MEM,</div><div><span style="white-space: pre; ">                </span>.mapbase = 0xfc000028,</div>
<div><span style="white-space: pre; ">                </span>.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP&nbsp;|&nbsp;UPF_SHARE_IRQ,</div><div><span style="white-space: pre; ">                </span>.irq<span style="white-space: pre; ">        </span>= MPC52xx_IRQ3,</div>
<div><span style="white-space: pre; ">                </span>},</div><div><span style="white-space: pre; ">        </span>{},</div><div>};</div><div><br></div><div>static struct platform_device serial8250_device = {<br></div><div><span style="white-space: pre; ">        </span>.name<span style="white-space: pre; ">                </span>= &quot;serial8250&quot;,</div>
<div><span style="white-space: pre; ">        </span>.id<span style="white-space: pre; ">                </span>= 0,</div><div><span style="white-space: pre; ">        </span>.dev.platform_data = serial8250_ports,</div><div>};</div><div><br></div><div>
static int __init</div><div>add_serial8250_devices(void)</div><div>{</div><div><span style="white-space: pre; ">        </span>return platform_device_register(&amp;serial8250_device);</div><div>}</div><div><br></div><div>arch_initcall(add_serial8250_devices);</div>
<div><br></div><div><span style="font-weight: bold; ">The boot message is :</span></div><div><span style="border-collapse: collapse; "><div>FT-Boot 1.2.0 (Sep 17 2008 - 09:16:55)</div><div><br></div><div>CPU: &nbsp; MPC5200 v2.2, Core v1.4 at 462 MHz</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; Bus 132 MHz, IPB 132 MHz, PCI 33 MHz</div><div>Board: FXALM(mpc52xx)</div><div>I2C: &nbsp; 85 kHz, ready</div><div>DRAM: &nbsp;256 MB</div><div>FLASH: (Bank#1 - 512 kB, Bank#2 - 16 MB) 16.5 MB</div><div>In: &nbsp; &nbsp;serial</div>
<div>Out: &nbsp; serial</div><div>Err: &nbsp; serial</div><div>Net: &nbsp; FEC ETHERNET</div><div>IDE: &nbsp; Bus 0: OK&nbsp;</div><div>&nbsp;&nbsp;Device 0: Model: 128MB &nbsp;ATA Flash Disk Firm: ADAA408J Ser#: A161112339F000831558</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Type: Hard Disk</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Capacity: 122.1 MB = 0.1 GB (250112 x 512)</div><div>Hit any key to stop autoboot: &nbsp;0&nbsp;</div><div>Using FEC ETHERNET device</div><div>TFTP from server&nbsp;<a href="http://192.168.1.40" target="_blank" style="color: rgb(17, 65, 112); ">192.168.1.40</a>; our IP address is&nbsp;<a href="http://192.168.1.50" target="_blank" style="color: rgb(17, 65, 112); ">192.168.1.50</a></div>
<div>Filename &#39;/tftpboot/uImage&#39;.</div><div>Load address: 0x200000</div><div>Loading: #################################################################</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; #################################################################</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; #################################################################</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; ########################################################</div><div>done</div><div>Bytes transferred = 1281939 (138f93 hex)</div>
<div>## Booting image at 00200000 ...</div><div>&nbsp;&nbsp; Image Name: &nbsp; Linux-2.6.16</div><div>&nbsp;&nbsp; Created: &nbsp; &nbsp; &nbsp;2008-11-19 &nbsp;19:22:59 UTC</div><div>&nbsp;&nbsp; Image Type: &nbsp; PowerPC Linux Kernel Image (gzip compressed)</div><div>&nbsp;&nbsp; Data Size: &nbsp; &nbsp;1281875 Bytes = &nbsp;1.2 MB</div>
<div>&nbsp;&nbsp; Load Address: 00000000</div><div>&nbsp;&nbsp; Entry Point: &nbsp;00000000</div><div>&nbsp;&nbsp; Uncompressing Kernel Image ... OK</div><div>id mach(): done</div><div>MMU:enter</div><div>MMU:hw init</div><div>MMU:mapin</div><div>MMU:setio</div>
<div>MMU:exit</div><div>setup_arch: enter</div><div>setup_arch: bootmem</div><div>arch: exit</div><div>bootinfo is find_bootinfo()&lt;5&gt;Linux version 2.6.16 (root@localhost.localdomain) (gcc version 3.4.3) #50 Thu No8</div>
<div>Built 1 zonelists</div><div>Kernel command line: console=ttyPSC0,9600 root=/dev/nfs rw nfsroot=192.168.1.40:/home/hyz/ltib-mpc5200-20070201</div><div>PID hash table entries: 2048 (order: 11, 32768 bytes)</div><div>Console: colour dummy device 80x25</div>
<div>Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)</div><div>Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)</div><div>Memory: 256896k available (1968k kernel code, 664k data, 100k init, 0k highmem)</div>
<div>Mount-cache hash table entries: 512</div><div>NET: Registered protocol family 16</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>DMA: MPC52xx BestComm driver</div><div>MPC52xx BestComm inited</div><div>SCSI subsystem initialized</div>
<div>Installing knfsd (copyright (C) 1996&nbsp;<a href="mailto:okir@monad.swb.de" target="_blank" style="color: rgb(17, 65, 112); ">okir@monad.swb.de</a>).</div><div>JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.</div><div>
io scheduler noop registered</div><div>io scheduler anticipatory registered (default)</div><div>io scheduler deadline registered</div><div>io scheduler cfq registered</div><div>Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports,&nbsp;<span style="color: rgb(255, 0, 0); ">IRQ sharing enabled</span></div>
<div>serial8250.0: ttyS0 at MMIO 0xfc000000<span style="background-color: rgb(255, 255, 255); ">&nbsp;(<span style="color: rgb(255, 0, 0); ">irq = 6</span>)</span>&nbsp;is a 16550A</div><div>serial8250.0: ttyS1 at MMIO 0xfc000008 (<span style="background-color: rgb(255, 255, 255); "><span style="color: rgb(255, 0, 0); ">i</span></span><span style="background-color: rgb(255, 255, 255); "><span style="color: rgb(255, 0, 0); ">rq = 6</span></span>) is a 16550A</div>
<div>serial8250.0: ttyS2 at MMIO 0xfc000010&nbsp;<span style="color: rgb(255, 102, 102); ">(irq = 7</span>) is a 16550A</div><div>serial8250.0: ttyS3 at MMIO 0xfc000018 (<span style="color: rgb(255, 102, 102); ">irq = 7</span>) is a 16550A</div>
<div>serial8250.0: ttyS4 at MMIO 0xfc000020<span style="background-color: rgb(255, 255, 255); ">&nbsp;(</span><span style="background-color: rgb(255, 255, 255); "><span style="color: rgb(255, 0, 0); ">irq = 8</span></span>) is a 16550A</div>
<div>serial8250.0: ttyS5 at MMIO 0xfc000028&nbsp;<span style="color: rgb(255, 0, 0); ">(irq = 8</span>) is a 16550A</div><div>Serial: MPC52xx PSC driver</div><div>ttyPSC0 at MMIO 0xf0002000 (irq = 40) is a MPC52xx PSC</div><div>
ttyPSC1 at MMIO 0xf0002200 (irq = 41) is a MPC52xx PSC</div><div>ttyPSC2 at MMIO 0xf0002400 (irq = 42) is a MPC52xx PSC</div><div>ttyPSC3 at MMIO 0xf0002600 (irq = 50) is a MPC52xx PSC</div><div>ttyPSC4 at MMIO 0xf0002800 (irq = 51) is a MPC52xx PSC</div>
<div>ttyPSC5 at MMIO 0xf0002c00 (irq = 43) is a MPC52xx PSC</div><div>RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize</div><div>Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2</div><div>ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx</div>
<div>ide: MPC52xx IDE/ATA driver</div><div>eth0: Phy @ 0x0, type LXT971 (0x001378e2)</div><div>hda: 128MB ATA Flash Disk, ATA DISK drive</div><div>ide0 at 0xf0003a60-0xf0003a67,0xf0003a5c on irq 46</div><div>mpc52xx-ide: Setup successful for ide0 (mem=f0003a00-f0003aff irq=46)</div>
<div>hda: max request size: 128KiB</div><div>hda: 250112 sectors (128 MB) w/1KiB Cache, CHS=977/8/32</div><div>hda: cache flushes not supported</div><div>&nbsp;hda: hda1</div><div>flash chip on the Lite5200/Lite5200B: Found 1 x16 devices at 0x0 in 8-bit bank</div>
<div>&nbsp;Intel/Sharp Extended Query Table at 0x0031</div><div>Using buffer write method</div><div>cfi_cmdset_0001: Erase suspend on write enabled</div><div>Creating 1 MTD partitions on &quot;flash chip on the Lite5200/Lite5200B&quot;:</div>
<div>0x00000000-0x01000000 : &quot;Filesystem&quot;</div><div>mice: PS/2 mouse device common for all mice</div><div>NET: Registered protocol family 2</div><div>IP route cache hash table entries: 4096 (order: 2, 16384 bytes)</div>
<div>TCP established hash table entries: 16384 (order: 4, 65536 bytes)</div><div>TCP bind hash table entries: 16384 (order: 4, 65536 bytes)</div><div>TCP: Hash tables configured (established 16384 bind 16384)</div><div>TCP reno registered</div>
<div>TCP bic registered</div><div>NET: Registered protocol family 1</div><div>NET: Registered protocol family 17</div><div>eth0: config: auto-negotiation on, 100HDX, 10HDX.</div><div>IP-Config: Complete:</div><div>&nbsp;&nbsp; &nbsp; &nbsp;device=eth0, addr=<a href="http://192.168.1.50" target="_blank" style="color: rgb(17, 65, 112); ">192.168.1.50</a>, mask=<a href="http://255.255.255.0" target="_blank" style="color: rgb(17, 65, 112); ">255.255.255.0</a>, gw=<a href="http://192.168.1.1" target="_blank" style="color: rgb(17, 65, 112); ">192.168.1.1</a>,</div>
<div>&nbsp;&nbsp; &nbsp; host=<a href="http://192.168.1.50" target="_blank" style="color: rgb(17, 65, 112); ">192.168.1.50</a>, domain=, nis-domain=(none),</div><div>&nbsp;&nbsp; &nbsp; bootserver=<a href="http://192.168.1.40" target="_blank" style="color: rgb(17, 65, 112); ">192.168.1.40</a>, rootserver=<a href="http://192.168.1.40" target="_blank" style="color: rgb(17, 65, 112); ">192.168.1.40</a>, rootpath=</div>
<div>Looking up port of RPC 100003/2 on&nbsp;<a href="http://192.168.1.40" target="_blank" style="color: rgb(17, 65, 112); ">192.168.1.40</a></div><div>Looking up port of RPC 100005/1 on&nbsp;<a href="http://192.168.1.40" target="_blank" style="color: rgb(17, 65, 112); ">192.168.1.40</a></div>
<div>VFS: Mounted root (nfs filesystem).</div><div style="color: rgb(80, 0, 80); "><div>Freeing unused kernel memory: 100k init</div><div><br></div><div><br></div><div><span style="font-weight: bold; "><span style="color: rgb(0, 0, 0); ">Stoping&nbsp;here now~~~, I can&#39;t find reason and what I should do?</span></span></div>
</div></span></div></span></div></span></span>