* Code cleanup:
  - remove trailing white space, trailing empty lines, C++ comments, etc.
  - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)

* Patches by Kenneth Johansson, 25 Jun 2003:
  - major rework of command structure
    (work done mostly by Michal Cendrowski and Joakim Kristiansen)
diff --git a/board/rpxsuper/Makefile b/board/rpxsuper/Makefile
index 85ea1fc..4535106 100644
--- a/board/rpxsuper/Makefile
+++ b/board/rpxsuper/Makefile
@@ -28,7 +28,7 @@
 OBJS	:= rpxsuper.o flash.o mii_phy.o
 
 $(LIB):	$(OBJS) $(SOBJS)
-	$(AR) crv $@ $^
+	$(AR) crv $@ $(OBJS)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
diff --git a/board/rpxsuper/flash.c b/board/rpxsuper/flash.c
index 73281bd..d80e778 100644
--- a/board/rpxsuper/flash.c
+++ b/board/rpxsuper/flash.c
@@ -172,7 +172,7 @@
 	* Bank 2 (48 Sectors): 23-70=64kbyte
 	*/
 	info->flash_id     = (AMD_MANUFACT & FLASH_VENDMASK) |
-                             (AMD_ID_DL323B & FLASH_TYPEMASK);
+			     (AMD_ID_DL323B & FLASH_TYPEMASK);
 	info->sector_count = 71;
 	info->size         = 4 * (8 * 8 + 63 * 64) * 1024;
     }
@@ -183,24 +183,24 @@
 
     /* set up sector start address table */
     for (i = 0; i < 8; i++) {
-        info->start[i] = base + (i * 0x8000);
+	info->start[i] = base + (i * 0x8000);
     }
     for (i = 8; i < info->sector_count; i++) {
-        info->start[i] = base + (i * 0x40000) + 8 * 0x8000 - 8 * 0x40000;
+	info->start[i] = base + (i * 0x40000) + 8 * 0x8000 - 8 * 0x40000;
     }
 
     /* check for protected sectors */
     for (i = 0; i < info->sector_count; i++) {
-        /* read sector protection at sector address */
+	/* read sector protection at sector address */
 	addr = (volatile unsigned long *)(info->start[i]);
-        addr[2 * 0x0555] = 0xAAAAAAAA;
+	addr[2 * 0x0555] = 0xAAAAAAAA;
 	addr[2 * 0x02AA] = 0x55555555;
 	addr[2 * 0x0555] = 0x90909090;
 	addr[2 * 0x0555 + 1] = 0xAAAAAAAA;
 	addr[2 * 0x02AA + 1] = 0x55555555;
 	addr[2 * 0x0555 + 1] = 0x90909090;
 	udelay (1000);
-    	base = RD_SWP32(&addr[4]);
+	base = RD_SWP32(&addr[4]);
 	base |= RD_SWP32(&addr[5]);
 	info->protect[i] = base & 0x00010001 ? 1 : 0;
     }
@@ -404,14 +404,14 @@
     flag = disable_interrupts();
 
     if ((dest & 0x00000004) == 0) {
-        addr[2 * 0x0555] = 0xAAAAAAAA;
+	addr[2 * 0x0555] = 0xAAAAAAAA;
 	addr[2 * 0x02AA] = 0x55555555;
-        addr[2 * 0x0555] = 0xA0A0A0A0;
+	addr[2 * 0x0555] = 0xA0A0A0A0;
     }
     else {
-        addr[2 * 0x0555 + 1] = 0xAAAAAAAA;
+	addr[2 * 0x0555 + 1] = 0xAAAAAAAA;
 	addr[2 * 0x02AA + 1] = 0x55555555;
-        addr[2 * 0x0555 + 1] = 0xA0A0A0A0;
+	addr[2 * 0x0555 + 1] = 0xA0A0A0A0;
     }
 
     *((vu_long *)dest) = data;
diff --git a/board/rpxsuper/mii_phy.c b/board/rpxsuper/mii_phy.c
index 319f959..ef99aff 100644
--- a/board/rpxsuper/mii_phy.c
+++ b/board/rpxsuper/mii_phy.c
@@ -38,7 +38,7 @@
 	if (phy_reg & 0x0400)
 	    printf("Phy operating at %d MBit/s in %s-duplex mode\n",
 		phy_reg & 0x4000 ? 100 : 10,
-	    	phy_reg & 0x0200 ? "full" : "half");
+		phy_reg & 0x0200 ? "full" : "half");
 	else
 	    printf("bad link!!\n");
 /*
@@ -59,7 +59,7 @@
     tmp = 0x6002 | (adr << 7) | (reg << 2);
     regs->bcsr4 = 0xC3;
     for (i = 0; i < 64; i++) {
-        regs->bcsr4 ^= MII_MDCK;
+	regs->bcsr4 ^= MII_MDCK;
     }
     for (i = 0; i < 16; i++) {
 	regs->bcsr4 &= ~MII_MDCK;
@@ -92,7 +92,7 @@
     }
     for (i = 0; i < 16; i++) {
 	regs->bcsr4 &= ~MII_MDCK;
-        if (tmp & 0x8000) regs->bcsr4 |= MII_MDIO;
+	if (tmp & 0x8000) regs->bcsr4 |= MII_MDIO;
 	else regs->bcsr4 &= ~MII_MDIO;
 	regs->bcsr4 |= MII_MDCK;
 	tmp <<= 1;
@@ -105,4 +105,3 @@
 	val <<= 1;
     }
 }
-
diff --git a/board/rpxsuper/rpxsuper.c b/board/rpxsuper/rpxsuper.c
index 2c0717e..50b3c5c 100644
--- a/board/rpxsuper/rpxsuper.c
+++ b/board/rpxsuper/rpxsuper.c
@@ -42,7 +42,7 @@
 
     /* Port A configuration */
     {	/*	      conf ppar psor pdir podr pdat */
-        /* PA31 */ {   1,   0,   0,   0,   0,   0   }, /* FCC1 *ATMTXEN */
+	/* PA31 */ {   1,   0,   0,   0,   0,   0   }, /* FCC1 *ATMTXEN */
 	/* PA30 */ {   1,   0,   0,   0,   0,   0   }, /* FCC1 ATMTCA   */
 	/* PA29 */ {   1,   0,   0,   0,   0,   0   }, /* FCC1 ATMTSOC  */
 	/* PA28 */ {   1,   0,   0,   0,   0,   0   }, /* FCC1 *ATMRXEN */
@@ -271,7 +271,7 @@
 
     memctl->memc_psdmr = psdmr | PSDMR_OP_CBRR;
     for (i = 0; i < 8; i++)
-        *ramaddr = c;
+	*ramaddr = c;
 
     memctl->memc_psdmr = psdmr | PSDMR_OP_MRW;
     *ramaddr = c;
diff --git a/board/rpxsuper/u-boot.lds b/board/rpxsuper/u-boot.lds
index b4e502b..44224cb 100644
--- a/board/rpxsuper/u-boot.lds
+++ b/board/rpxsuper/u-boot.lds
@@ -93,6 +93,11 @@
   _edata  =  .;
   PROVIDE (edata = .);
 
+  __u_boot_cmd_start = .;
+  .u_boot_cmd : { *(.u_boot_cmd) }
+  __u_boot_cmd_end = .;
+
+
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
   __stop___ex_table = .;
@@ -115,4 +120,3 @@
   _end = . ;
   PROVIDE (end = .);
 }
-