-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

HI:
   i think u should spend sometime to look into
this two function (cpu_init, board_init)
i've tried, after this two functions. we can bring up
serial console.

i haven't got enough time to look into problem,
guess this maybe GPIO conflict issue

hope this will point my a way out...

cpu_init (cpu/arm920t/cpu.c)
board_init(gta02.c)

here is a little patch against u-boot
which prove my thought.



xiangfu wrote:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIj7BY28unoHSQkyIRAqCHAJ4yoIFUX8wz/vnVGr7c8uYHTJloZACgoUYF
bQ5Ihy27eKfTTNEZ2iWJkuE=
=O8Eo
-----END PGP SIGNATURE-----
diff --git a/cpu/arm920t/s3c24x0/serial.c b/cpu/arm920t/s3c24x0/serial.c
index ba60ad1..44c3a39 100644
--- a/cpu/arm920t/s3c24x0/serial.c
+++ b/cpu/arm920t/s3c24x0/serial.c
@@ -89,8 +89,11 @@ void _serial_setbrg(const int dev_index)
 	int i;
 
 	/* value is calculated so : (int)(PCLK/16./baudrate) -1 */
+#if 0
 	reg = get_PCLK() / (16 * gd->baudrate) - 1;
-
+#else
+	reg = get_PCLK() / (16 * 115200) - 1;
+#endif    
 	uart->UBRDIV = reg;
 	for (i = 0; i < 100; i++);
 }
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 22d573a..c1bca2e 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -89,6 +89,10 @@ extern void rtl8019_get_enetaddr (uchar * addr);
 #include <i2c.h>
 #endif
 
+extern int s3serial2_init(void);
+extern void s3serial2_setbrg(void);
+extern void s3serial2_putc(char c);
+extern void s3serial2_puts(char *s);
 /*
  * Begin and End of memory area for malloc(), and current "brk"
  */
@@ -274,10 +278,28 @@ init_fnc_t *init_sequence[] = {
 	NULL,
 };
 
+#define TST_UART_NUM 0
+
 void start_armboot (void)
 {
 	init_fnc_t **init_fnc_ptr;
 	char *s;
+	unsigned char index = 0, cnt ;
+    cpu_init();
+    board_init();
+   #if 1
+           s3serial2_init();
+           s3serial2_setbrg();
+           cnt = index;
+           while(1) {
+           	    s3serial2_putc('0' + cnt);
+           	    s3serial2_puts("-> Serial Console: Hello Dennis.\n");
+   		        udelay(1000000);
+                cnt ++;
+           }
+    #endif
+
+
 #ifndef CFG_NO_FLASH
 	ulong size;
 #endif

Attachment: uboot_serial_patch_0730.patch.sig
Description: Binary data

Reply via email to