* Patch by Rune Torgersen, 27 Feb 2004:
  - Added LBA48 support (CONFIG_LBA48 & CFG_64BIT_LBA)
  - Added support for 64bit printing in vsprintf (CFG_64BIT_VSPRINTF)
  - Added support for 64bit strtoul (CFG_64BIT_STRTOUL)

* Patch by Masami Komiya, 27 Feb 2004:
  Fix rarpboot: add autoload by NFS

* Patch by Dan Eisenhut, 26 Feb 2004:
  fix flash_write return value in saveenv

* Patch by Stephan Linz, 11 Dec 2003
  expand config.mk to avoid trigraph warnings on NIOS

* Rename "BMS2003" board into "HMI10"
diff --git a/common/cmd_pcmcia.c b/common/cmd_pcmcia.c
index 53d2227..cb4e4c6 100644
--- a/common/cmd_pcmcia.c
+++ b/common/cmd_pcmcia.c
@@ -160,8 +160,8 @@
 }
 #else
 
-#ifdef CONFIG_BMS2003
-# define  BMS2003_FRAM_TIMING	(PCMCIA_SHT(2) | PCMCIA_SST(2) | PCMCIA_SL(4))
+#ifdef CONFIG_HMI10
+# define  HMI10_FRAM_TIMING	(PCMCIA_SHT(2) | PCMCIA_SST(2) | PCMCIA_SL(4))
 #endif
 #if defined(CONFIG_LWMON) || defined(CONFIG_NSCU)
 # define  CFG_PCMCIA_TIMING	(PCMCIA_SHT(9) | PCMCIA_SST(3) | PCMCIA_SL(12))
@@ -200,14 +200,14 @@
 		switch (i) {
 #ifdef CONFIG_IDE_8xx_PCCARD
 		case 4:
-#ifdef CONFIG_BMS2003
+#ifdef CONFIG_HMI10
 		    {	/* map FRAM area */
 			win->or = (	PCMCIA_BSIZE_256K
 				|	PCMCIA_PPS_8
 				|	PCMCIA_PRS_ATTR
 				|	slotbit
 				|	PCMCIA_PV
-				|	BMS2003_FRAM_TIMING );
+				|	HMI10_FRAM_TIMING );
 			break;
 		    }
 #endif
@@ -241,7 +241,7 @@
 			break;
 		    }
 #endif	/* CONFIG_IDE_8xx_PCCARD */
-#ifdef CONFIG_BMS2003
+#ifdef CONFIG_HMI10
 		case 3: {	/* map I/O window for 4xUART data/ctrl */
 			win->br += 0x40000;
 			win->or = (	PCMCIA_BSIZE_256K
@@ -252,7 +252,7 @@
 				|	CFG_PCMCIA_TIMING );
 			break;
 		    }
-#endif /* CONFIG_BMS2003 */
+#endif /* CONFIG_HMI10 */
 		default:	/* set to not valid */
 			win->or = 0;
 			break;
@@ -636,7 +636,7 @@
 	PCMCIA_PGCRX(slot) = reg;
 	udelay(500);
 
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
 #ifndef CONFIG_NSCU
 	/*
 	 * Configure Port C pins for
@@ -648,7 +648,7 @@
 
 	immap->im_ioport.iop_pcdat &= ~(0x0002 | 0x0004);
 #endif
-#else	/* CONFIG_BMS2003 */
+#else	/* CONFIG_HMI10 */
 	/*
 	 * Configure Port B  pins for
 	 * 5 Volts Enable and 3 Volts enable
@@ -657,7 +657,7 @@
 
 	/* remove all power */
 	immap->im_cpm.cp_pbdat |= 0x00000300;
-#endif	/* CONFIG_BMS2003 */
+#endif	/* CONFIG_HMI10 */
 
 	/*
 	 * Make sure there is a card in the slot, then configure the interface.
@@ -666,11 +666,11 @@
 	debug ("[%d] %s: PIPR(%p)=0x%x\n",
 		__LINE__,__FUNCTION__,
 		&(pcmp->pcmc_pipr),pcmp->pcmc_pipr);
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
 	if (pcmp->pcmc_pipr & (0x18000000 >> (slot << 4))) {
 #else
 	if (pcmp->pcmc_pipr & (0x10000000 >> (slot << 4))) {
-#endif	/* CONFIG_BMS2003 */
+#endif	/* CONFIG_HMI10 */
 		printf ("   No Card found\n");
 		return (1);
 	}
@@ -686,25 +686,25 @@
 		(reg&PCMCIA_VS2(slot))?"n":"ff");
 #ifndef CONFIG_NSCU
 	if ((reg & mask) == mask) {
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
 		immap->im_ioport.iop_pcdat |= 0x0004;
 #else
 		immap->im_cpm.cp_pbdat &= ~(0x0000100);
-#endif	/* CONFIG_BMS2003 */
+#endif	/* CONFIG_HMI10 */
 		puts (" 5.0V card found: ");
 	} else {
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
 		immap->im_ioport.iop_pcdat |= 0x0002;
 #else
 		immap->im_cpm.cp_pbdat &= ~(0x0000200);
-#endif	/* CONFIG_BMS2003 */
+#endif	/* CONFIG_HMI10 */
 		puts (" 3.3V card found: ");
 	}
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
 	immap->im_ioport.iop_pcdir |= (0x0002 | 0x0004);
 #else
 	immap->im_cpm.cp_pbdir |= 0x00000300;
-#endif	/* CONFIG_BMS2003 */
+#endif	/* CONFIG_HMI10 */
 #else
 	if ((reg & mask) == mask) {
 		puts (" 5.0V card found: ");
@@ -749,14 +749,14 @@
 	immap = (immap_t *)CFG_IMMR;
 	pcmp = (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
 
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
 #ifndef CONFIG_NSCU
 	/* remove all power */
 	immap->im_ioport.iop_pcdat &= ~(0x0002 | 0x0004);
 #endif
-#else	/* CONFIG_BMS2003 */
+#else	/* CONFIG_HMI10 */
 	immap->im_cpm.cp_pbdat |= 0x00000300;
-#endif	/* CONFIG_BMS2003 */
+#endif	/* CONFIG_HMI10 */
 
 	debug ("Disable PCMCIA buffers and assert RESET\n");
 	reg  = 0;
@@ -806,7 +806,7 @@
 	PCMCIA_PGCRX(slot) = reg;
 	udelay(500);
 
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
 	/*
 	 * Configure Port C pins for
 	 * 5 Volts Enable and 3 Volts enable,
@@ -824,7 +824,7 @@
 	case 50: reg |= 0x0004;	break;
 	default: 		goto done;
 	}
-#else	/* CONFIG_BMS2003 */
+#else	/* CONFIG_HMI10 */
 	/*
 	 * Configure Port B pins for
 	 * 5 Volts Enable and 3 Volts enable,
@@ -843,7 +843,7 @@
 		case 50: reg |= 0x00000100;	break;
 		default:			goto done;
 }
-#endif	/* CONFIG_BMS2003 */
+#endif	/* CONFIG_HMI10 */
 
 	/* Checking supported voltages */
 
@@ -851,21 +851,21 @@
 		pcmp->pcmc_pipr,
 		(pcmp->pcmc_pipr & 0x00008000) ? "only 5 V" : "can do 3.3V");
 
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
 	immap->im_ioport.iop_pcdat |= reg;
 	immap->im_ioport.iop_pcdir |= (0x0002 | 0x0004);
 #else
 	immap->im_cpm.cp_pbdat &= !reg;
 	immap->im_cpm.cp_pbdir |= 0x00000300;
-#endif	/* CONFIG_BMS2003 */
+#endif	/* CONFIG_HMI10 */
 	if (reg) {
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
 		debug ("PCMCIA powered at %sV\n",
 			(reg&0x0004) ? "5.0" : "3.3");
 #else
 		debug ("PCMCIA powered at %sV\n",
 			(reg&0x00000200) ? "5.0" : "3.3");
-#endif	/* CONFIG_BMS2003 */
+#endif	/* CONFIG_HMI10 */
 	} else {
 		debug ("PCMCIA powered down\n");
 	}
@@ -1850,11 +1850,11 @@
 	debug ("[%d] %s: PIPR(%p)=0x%x\n",
 		__LINE__,__FUNCTION__,
 		&(pcmp->pcmc_pipr),pcmp->pcmc_pipr);
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
 	if (pcmp->pcmc_pipr & (0x18000000 >> (slot << 4))) {
 #else
 	if (pcmp->pcmc_pipr & (0x10000000 >> (slot << 4))) {
-#endif	/* CONFIG_BMS2003 */
+#endif	/* CONFIG_HMI10 */
 		printf ("   No Card found\n");
 		return (1);
 	}