Index: c/src/lib/libbsp/arm/rtl22xx/ChangeLog
===================================================================
--- c/src/lib/libbsp/arm/rtl22xx/ChangeLog	(revision 22a8f0584004b23a58ae7787ebbb2d7bce87a5b7)
+++ c/src/lib/libbsp/arm/rtl22xx/ChangeLog	(revision e890774a799e1ea99221330f54d05cd7e8158629)
@@ -1,2 +1,9 @@
+2007-05-01	Ray Xu <xr@trasin.net>
+
+	* README, times, console/lpc22xx_uart.h, console/uart.c, include/bsp.h,
+	start/start.S, startup/bspstart.c, startup/exit.c, startup/linkcmds:
+	Update BSP to address changes between 4.7 and CVS head as well as to
+	address comments from Ralf and Joel.
+
 2007-04-26	Ralf CorsÃ©pius <ralf.corsepius@rtems.org>
 
Index: c/src/lib/libbsp/arm/rtl22xx/README
===================================================================
--- c/src/lib/libbsp/arm/rtl22xx/README	(revision 22a8f0584004b23a58ae7787ebbb2d7bce87a5b7)
+++ c/src/lib/libbsp/arm/rtl22xx/README	(revision e890774a799e1ea99221330f54d05cd7e8158629)
@@ -1,6 +1,6 @@
 
 RTEMS bsp for Philips's ARM processor
-This BSP is design for Philips's LPC2210/LPC2212/LPC2214/LPC2290/LPC2294 (LPC22xx) serial ARM processor. 
+This BSP is design for Philips's LPC2210/LPC2212/LPC2214/LPC2290/LPC2294 (LPC22xx)  serial ARM processor. Some LPC21xx ARM can also use this.
 Philphs's LPC22xx ARM processor got an ARM7TDMI-S core, and can run at 60MHz. It has an external memory bus, and peripherals like UART, I2C, SPI, ADC and etc. Some of them got on chip flash (256k) and CAN.
-The board used to develop the board is compatible with LPC-E2214/LPC-E2294 boards from http://www.olimex.com. The board got a 256K SDRAM and two serial ports.
+The board used to develop the board is compatible with LPC-E2214/LPC-E2294 boards from http://www.olimex.com. The board got a 512K SRAM(256K used to store the .text for debug perpose) and two serial ports.
 The license and distribution terms for this file may be found in the file LICENSE in this distribution or at http://www.rtems.com/license/LICENSE
Index: c/src/lib/libbsp/arm/rtl22xx/console/lpc22xx_uart.h
===================================================================
--- c/src/lib/libbsp/arm/rtl22xx/console/lpc22xx_uart.h	(revision 22a8f0584004b23a58ae7787ebbb2d7bce87a5b7)
+++ c/src/lib/libbsp/arm/rtl22xx/console/lpc22xx_uart.h	(revision e890774a799e1ea99221330f54d05cd7e8158629)
@@ -1,3 +1,3 @@
-/*Define for LPC22xx*/
+/*Define for LPC22xx/LPC21xx */
 #ifndef UART_H
 #define UART_H
Index: c/src/lib/libbsp/arm/rtl22xx/console/uart.c
===================================================================
--- c/src/lib/libbsp/arm/rtl22xx/console/uart.c	(revision 22a8f0584004b23a58ae7787ebbb2d7bce87a5b7)
+++ c/src/lib/libbsp/arm/rtl22xx/console/uart.c	(revision e890774a799e1ea99221330f54d05cd7e8158629)
@@ -8,5 +8,5 @@
  *  need to write the ISR, and in the ISR insert the
  *  chars into termios's queue.
- *  Copyright (c) By ray
+ *  Copyright (c) By ray <rayx.cn@gmail.com>
  *
  *  The license and distribution terms for this file may be
@@ -169,5 +169,6 @@
         }
     } else {
-        printk("Unknown console minor number: %d\n", minor);
+        debug_printk("Unknown console minor number");
+        printi(minor);
         return -1;
     }
@@ -198,5 +199,6 @@
             }
         }else {
-        printk("Unknown console minor number: %d\n", minor);
+        debug_printk("Unknown console minor number");
+        printi(minor);
         return -1;
     }
Index: c/src/lib/libbsp/arm/rtl22xx/include/bsp.h
===================================================================
--- c/src/lib/libbsp/arm/rtl22xx/include/bsp.h	(revision 22a8f0584004b23a58ae7787ebbb2d7bce87a5b7)
+++ c/src/lib/libbsp/arm/rtl22xx/include/bsp.h	(revision e890774a799e1ea99221330f54d05cd7e8158629)
@@ -1,6 +1,6 @@
 /*
- * Philips LPC22XX BSP header file
+ * Philips LPC22XX/LPC21xx BSP header file
  *
- * by Ray,Xu
+ * by Ray,Xu <Rayx.cn@gmail.com>
  *  
  *  The license and distribution terms for this file may be
Index: c/src/lib/libbsp/arm/rtl22xx/start/start.S
===================================================================
--- c/src/lib/libbsp/arm/rtl22xx/start/start.S	(revision 22a8f0584004b23a58ae7787ebbb2d7bce87a5b7)
+++ c/src/lib/libbsp/arm/rtl22xx/start/start.S	(revision e890774a799e1ea99221330f54d05cd7e8158629)
@@ -1,11 +1,7 @@
 /*
- * Philips LPC22XX Startup code
+ * Philips LPC22XX/LPC21xx Startup code
  *
- * Copyright (c) 2005 Ray xu
- *
- * Copyright (c) 2002 by Jay Monkman <jtm@smoothsmoothie.com>
- *
- * Copyright (c) 2002 by Charlie Steader <charlies@poliac.com>
- *
+ * Copyright (c) 2007 Ray Xu<rayx.cn@gmail.com>
+ * Change from CSB337's code by Jay Monkman <jtm@lopingdog.com>
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
Index: c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c	(revision 22a8f0584004b23a58ae7787ebbb2d7bce87a5b7)
+++ c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c	(revision e890774a799e1ea99221330f54d05cd7e8158629)
@@ -1,6 +1,6 @@
 /*
- *  LPC22XX Startup code
- *
- *  Copyright (c) 2005 by Ray X <rayx.cn@gmail.com>
+ *  LPC22XX/LPC21xx Startup code
+ *
+ *  Copyright (c) 2007 by Ray Xu <rayx.cn@gmail.com>
  *
  *  The license and distribution terms for this file may be
@@ -93,5 +93,6 @@
 
     /*   heap_size = (free_mem_end - heap_start - MEM_NOCACHE_SIZE); */
-    /*the board seems to have only 512K memory, we use 256K as heap*/
+    /*the board seems to have only 512K memory, we use 256K as heap, 256K to 
+    store the .text*/
     heap_size = 0x40000;
 
@@ -134,5 +135,4 @@
 void bsp_start_default( void )
 {
-    uint32_t i;
     PINSEL2 =0x0f814914;
     BCFG0 = 0x1000ffef;
@@ -172,4 +172,5 @@
 
     /* memory configure */
+    /* it is not needed in my formatter board */
     //MAMCR = 0;
     // MAMTIM = 3;
@@ -202,4 +203,5 @@
     #if 0
     debug_printk(" bsp_start_defalt");
+    printi((int)&bsp_start_defalt);
     
     debug_printk(" _bss_free_start");
@@ -217,7 +219,4 @@
     debug_printk(" free_mem_end");
     printi((int)free_mem_end);
-
-    
-    printi(free_mem_end);
     #endif
 
Index: c/src/lib/libbsp/arm/rtl22xx/startup/exit.c
===================================================================
--- c/src/lib/libbsp/arm/rtl22xx/startup/exit.c	(revision 22a8f0584004b23a58ae7787ebbb2d7bce87a5b7)
+++ c/src/lib/libbsp/arm/rtl22xx/startup/exit.c	(revision e890774a799e1ea99221330f54d05cd7e8158629)
@@ -1,6 +1,5 @@
 /*
- * Cirrus LPC22XX BSP Shutdown  code
- *
- * Copyright (c) 2002 by Jay Monkman <jtm@smoothsmoothie.com>
+ * Philips LPC22XX/LPC21xx BSP Shutdown  code
+ * Copyright (c) 2007 by Ray Xu <rayx.cn@gmail.com>
  *
  *  The license and distribution terms for this file may be
@@ -33,6 +32,6 @@
    * does.
    */
-  printk("\n");
-  printk(line);
+  debug_printk("\n");
+  debug_printk(line);
   while (uart_poll_read(0) < 0) continue;
 
Index: c/src/lib/libbsp/arm/rtl22xx/startup/linkcmds
===================================================================
--- c/src/lib/libbsp/arm/rtl22xx/startup/linkcmds	(revision 22a8f0584004b23a58ae7787ebbb2d7bce87a5b7)
+++ c/src/lib/libbsp/arm/rtl22xx/startup/linkcmds	(revision e890774a799e1ea99221330f54d05cd7e8158629)
@@ -3,4 +3,7 @@
  * By Ray,Xu
  * Rayx.cn@gmail.com
+ *	
+ *  LPC22xx ARM do not have a MMU, the formatter got 512kb SRAM
+ *  I set the code entry to the beging of SRAM for debugging perpurse
  *	
  *  The license and distribution terms for this file may be
@@ -11,6 +14,5 @@
  *
  *  $Id$
- *  LPC22xx ARM do not have a 
-*/
+ */
 
 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
@@ -37,5 +39,5 @@
 _fiq_stack_size = DEFINED(_fiq_stack_size) ? _fiq_stack_size : 0x50;
 _abt_stack_size = DEFINED(_abt_stack_size) ? _abt_stack_size : 0x50;
-_svc_stack_size = DEFINED(_svc_stack_size) ? _svc_stack_size : 0x2000;
+_svc_stack_size = DEFINED(_svc_stack_size) ? _svc_stack_size : 0x500;
 
 
Index: c/src/lib/libbsp/arm/rtl22xx/times
===================================================================
--- c/src/lib/libbsp/arm/rtl22xx/times	(revision 22a8f0584004b23a58ae7787ebbb2d7bce87a5b7)
+++ c/src/lib/libbsp/arm/rtl22xx/times	(revision e890774a799e1ea99221330f54d05cd7e8158629)
@@ -6,7 +6,7 @@
 
 Board:  rtl22xx
-CPU: Philips 2210
+CPU: Philips LPC2210
 Clock Speed: 60MHz
-Memory Configuration: 512K SRAM, 16 bit bus, no SDRAM, nor cache
+Memory Configuration: 512K SRAM(256K used to store the .text), 16 bit bus, no SDRAM, nor cache
 Cache: Data and Instruction cache enabled
 Wait States:
@@ -22,3 +22,2 @@
 rtems_semaphore_obtain: not available -- NO_WAIT 136
 rtems_semaphore_release: no waiting tasks 307
-
