[U-Boot-Users] Problem on using 16C552 with MPC8xx
Sam Song
samsongshu at yahoo.com.cn
Wed Mar 3 14:48:54 CET 2004
Hi,
I met a problem when debugging a ST16C552 on my custom
board.The related configuration is as follows:
#define CONFIG_CONS_INDEX 1 /* Added by Sam. Copy
from OXC board. */
#undef CONFIG_8xx_CONS_SMC2
#undef CONFIG_8xx_CONS_NONE
#define CONFIG_BAUDRATE 9600
#define CFG_UART_BASE 0xFA000000
#define CFG_NS16550
#define CFG_NS16550_SERIAL
#define CFG_NS16550_REG_SIZE -4
#define CFG_NS16550_CLK 1843200
#define CFG_NS16550_COM1 CFG_UART_BASE
#define CFG_BR4_PRELIM 0xFA000401 /* UART Chip U10
*/
#define CFG_OR4_PRELIM 0xFFFF0040
And detailed debug info pls see below.
[root at sgj dmt50-16550]# ppc_8xx-gdb u-boot
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General
Public License, and you are
welcome to change it and/or distribute copies of it
under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show
warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=powerpc-hardhat-linux"...
(gdb) target remote bdi:2001
Remote debugging using bdi:2001
boot_warm () at
/u-boot/dmt50-16550/cpu/mpc8xx/start.S:115
115 mtspr SRR1, r3 /*
Make SRR1 match MSR */
(gdb) b board_init_f
Breakpoint 1 at 0xfff086b0: file board.c, line 348.
(gdb) c
Continuing.
Breakpoint 1, board_init_f (bootflag=1) at board.c:348
348 memset ((void *) gd, 0, sizeof
(gd_t));
(gdb) d b
Delete all breakpoints? (y or n) y
(gdb) b console_init_f
Breakpoint 2 at 0xfff132b8: file console.c, line 367.
(gdb) c
Continuing.
Breakpoint 2, console_init_f () at console.c:367
367 gd->have_console = 1;
(gdb) d b
Delete all breakpoints? (y or n) y
(gdb) b display_options
Breakpoint 3 at 0xfff14884: file display_options.c,
line 33.
(gdb) c
Continuing.
Breakpoint 3, display_options () at
display_options.c:33
33 printf ("\n\n%s\n\n", version_string);
(gdb) d b
Delete all breakpoints? (y or n) y
(gdb) b serial.c:90
Breakpoint 4 at 0xfff0b490: file serial.c, line 90.
(gdb) c
Continuing.
Breakpoint 4, serial_puts (
s=0xfa202d40 "\n\nU-Boot 1.0.0 (Mar 3 2004 -
19:35:51)\n\n")
at serial.c:90
90 while (*s) {
(gdb) s
91 serial_putc (*s++);
(gdb) s
serial_putc (c=10 '\n') at serial.c:81
81 if (c == '\n')
(gdb) s
82 NS16550_putc(console, '\r');
(gdb) s
NS16550_putc (com_port=0xfa000000, c=13 '\r') at
ns16550.c:47
47 while ((com_port->lsr & LSR_THRE) == 0);
(gdb) s
[It hanged here.After ctrl~c serval times,it had]
Interrupted while waiting for the program.
Give up (and stop debugging it)? (y or n) y
(gdb) Quit
(gdb) quit
[root at localhost u-boot-16550]#
===================================================
On BDI2000 console:
BDI>re
- TARGET: processing user reset request
- TARGET: resetting target passed
- TARGET: processing target init list ....
- TARGET: processing target init list passed
BDI>bi 0xfff00120
Breakpoint identification is 0
BDI>g
- TARGET: target has entered debug mode
BDI>i
Target state : debug mode
Debug entry cause : instruction breakpoint
Current PC : 0xfff00120
BDI>ci
- TARGET: target has entered debug mode
- TARGET: target has entered debug mode
- TARGET: target has entered debug mode
- TARGET: target has entered debug mode
- TARGET: target has entered debug mode
- TARGET: target has entered debug mode
[When U-Boot hanged at ns16550.c,I got some
information on ST16C552 and MPC8xx Dual RAM]
BDI>i
Target state : debug mode
Debug entry cause : trace
Current PC : 0xfff0cec4
BDI>m 0
00000000 : 03ffffff 03ffffff 03ffffff 03ffffff ....
00000010 : 03ffffff 03ffffff 03ffffff 03ffffff ....
00000020 : 03ffffff 03ffffff 03ffffff 03ffffff ....
00000030 : 03ffffff 03ffffff 03ffffff 03ffffff ....
00000040 : 03ffffff 03ffffff 03ffffff 03ffffff ....
00000050 : 03ffffff 03ffffff 03ffffff 03ffffff ....
00000060 : 03ffffff 03ffffff 03ffffff 03ffffff ....
00000070 : 03ffffff 03ffffff 03ffffff 03ffffff ....
00000080 : 03ffffff 03ffffff 03ffffff 03ffffff ....
00000090 : 03ffffff 03ffffff 03ffffff 03ffffff ....
000000a0 : 03ffffff 03ffffff 03ffffff 03ffffff ....
000000b0 : 03ffffff 03ffffff 03ffffff 03ffffff ....
000000c0 : 03ffffff 03ffffff 03ffffff 03ffffff ....
000000d0 : 03ffffff 03ffffff 03ffffff 03ffffff ....
000000e0 : 03ffffff 03ffffff 03ffffff 03ffffff ....
000000f0 : 03ffffff 03ffffff 03ffffff 03ffffff ....
BDI>md 0xfa000000
fa000000 : 00000100 0360f0ff 00000100 0360f0ff .....
fa000010 : 00000100 0360f0ff 00000100 0360f0ff .....`
fa000020 : 00000100 0360f0ff 00000100 0360f0ff .....
fa000030 : 00000100 0360f0ff 00000100 0360f0ff .....`
fa000040 : 00000100 0360f0ff 00000100 0360f0ff .....`
fa000050 : 00000100 0360f0ff 00000100 0360f0ff .....`
fa000060 : 00000100 0360f0ff 00000100 0360f0ff .....
fa000070 : 00000100 0360f0ff 00000100 0360f0ff .....
fa000080 : 00000100 0360f0ff 00000100 0360f0ff .....
fa000090 : 00000100 0360f0ff 00000100 0360f0ff .....
fa0000a0 : 00000100 0360f0ff 00000100 0360f0ff .....
fa0000b0 : 00000100 0360f0ff 00000100 0360f0ff .....
fa0000c0 : 00000100 0360f0ff 00000100 0360f0ff .....
fa0000d0 : 00000100 0360f0ff 00000100 0360f0ff .....
fa0000e0 : 00000100 0360f0ff 00000100 0360f0ff .....
fa0000f0 : 00000100 0360f0ff 00000100 0360f0ff .....
BDI>m 0xfa202d40
fa202d40 : 0a0a552d 426f6f74 20312e30 2e302028
..U-Boot 1.0.0 (
fa202d50 : 4d617220 20332032 30303420 2d203139
Mar 3 2004 - 19
fa202d60 : 3a33353a 3531290a 0a004202 42441c18
:35:51)...B.BD..
fa202d70 : bc330868 4b827e4b 2050c005 20231802
.3.hK.~K P.. #..
fa202d80 : 5a1bada2 80a24890 0813799f 34fbd6e6
Z.....H...y.4...
fa202d90 : 98d252e1 4b81020a 0aa05fec 14007000
..R.K....._...p.
fa202da0 : 3293d1a5 6301171c c220d6a8 228a92d6
2...c.... .."...
fa202db0 : 705113ea 912d3485 9f351618 118dd6a8
pQ...-4..5......
fa202dc0 : fa202dd8 85f9d0dc f73effc6 3d538600
. -......>..=S..
fa202dd0 : fff23220 000000af fa202e00 fff1278c
..2 ..... ....'.
fa202de0 : 5c73423e d0328f43 fa202e00 000000a6
\sB>.2.C. ......
fa202df0 : ffffffff fa202ec0 fff23220 00000005
..... ....2 ....
fa202e00 : fa202e28 fff1266c b650a307 212ca06d
. .(..&l.P..!,.m
fa202e10 : fa202e28 de0c4805 fa202d40 fa202ec0
. .(..H.. - at . ..
fa202e20 : fff229b4 fff1bae8 fa202e80 fff085e4
..)...... ......
fa202e30 : 39363030 00000202 a8acfac3 4514cac2
9600........E...
BDI>
==================================================
[root at sgj root]# cu S0 at 9600
Connected.
[In the whole process,serial console didn't get any
output]
================================================
My questions:
1. Is it possible to use 16C552 as MPC8xx serial
console UART chip instead of using SMCx? It seemed
that only 82xx use UART chip as serial console in
u-boot source as far as I know.
2. Why did it hang there?How to make it?
Thanks in advance!
Sam
_________________________________________________________
Do You Yahoo!?
完全免费的雅虎电邮,马上注册获赠额外60兆网络存储空间
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.mail.yahoo.com
More information about the U-Boot
mailing list