diff -u -b -B -N -r -X dodiff.not u-boot.orig/common/cmd_ide.c u-boot/common/cmd_ide.c
--- u-boot.orig/common/cmd_ide.c	2004-03-25 20:29:40.000000000 +0100
+++ u-boot/common/cmd_ide.c	2004-04-01 11:59:54.356243810 +0200
@@ -782,15 +782,17 @@
 
 /* ------------------------------------------------------------------------- */
 
-#ifdef __PPC__
+#if defined(__PPC__) || defined(CONFIG_PXA_PCMCIA)
 static void __inline__
 ide_outb(int dev, int port, unsigned char val)
 {
-	PRINTF ("ide_outb (dev= %d, port= %d, val= 0x%02x) : @ 0x%08lx\n",
+	PRINTF ("ide_outb (dev= %d, port= %x, val= 0x%02x) : @ 0x%08lx\n",
 		dev, port, val, (ATA_CURR_BASE(dev)+port));
 
 	/* Ensure I/O operations complete */
+#ifndef CONFIG_PXA_PCMCIA
 	__asm__ volatile("eieio");
+#endif
 	*((uchar *)(ATA_CURR_BASE(dev)+port)) = val;
 }
 #else	/* ! __PPC__ */
@@ -802,15 +804,17 @@
 #endif	/* __PPC__ */
 
 
-#ifdef __PPC__
+#if defined(__PPC__) || defined(CONFIG_PXA_PCMCIA)
 static unsigned char __inline__
 ide_inb(int dev, int port)
 {
 	uchar val;
 	/* Ensure I/O operations complete */
+#ifndef CONFIG_PXA_PCMCIA
 	__asm__ volatile("eieio");
+#endif
 	val = *((uchar *)(ATA_CURR_BASE(dev)+port));
-	PRINTF ("ide_inb (dev= %d, port= %d) : @ 0x%08lx -> 0x%02x\n",
+	PRINTF ("ide_inb (dev= %d, port= %x) : @ 0x%08lx -> 0x%02x\n",
 		dev, port, (ATA_CURR_BASE(dev)+port), val);
 	return (val);
 }
@@ -856,6 +860,8 @@
 	volatile ushort	*pbuf = (ushort *)(ATA_CURR_BASE(dev)+ATA_DATA_REG);
 	ushort	*dbuf = (ushort *)sect_buf;
 
+	PRINTF("in input swap data base for read is %lx\n", (unsigned long) pbuf);
+
 	while (words--) {
 		*dbuf++ = ld_le16(pbuf);
 		*dbuf++ = ld_le16(pbuf);
@@ -878,7 +884,7 @@
 #endif	/* __LITTLE_ENDIAN || CONFIG_AU1X00 */
 
 
-#ifdef __PPC__
+#if defined(__PPC__) || defined(CONFIG_PXA_PCMCIA)
 static void
 output_data(int dev, ulong *sect_buf, int words)
 {
@@ -889,9 +895,13 @@
 	pbuf = (ushort *)(ATA_CURR_BASE(dev)+ATA_DATA_REG);
 	dbuf = (ushort *)sect_buf;
 	while (words--) {
+#ifndef CONFIG_PXA_PCMCIA
 		__asm__ volatile ("eieio");
+#endif
 		*pbuf = *dbuf++;
+#ifndef CONFIG_PXA_PCMCIA
 		__asm__ volatile ("eieio");
+#endif
 		*pbuf = *dbuf++;
 	}
 #else	/* CONFIG_HMI10 */
@@ -922,7 +932,7 @@
 }
 #endif	/* __PPC__ */
 
-#ifdef __PPC__
+#if defined(__PPC__) || defined(CONFIG_PXA_PCMCIA)
 static void
 input_data(int dev, ulong *sect_buf, int words)
 {
@@ -930,12 +940,20 @@
 	ushort	*dbuf;
 	volatile ushort	*pbuf;
 
+
 	pbuf = (ushort *)(ATA_CURR_BASE(dev)+ATA_DATA_REG);
 	dbuf = (ushort *)sect_buf;
+
+	PRINTF("in input data base for read is %lx\n", (unsigned long) pbuf);
+
 	while (words--) {
+#ifndef CONFIG_PXA_PCMCIA
 		__asm__ volatile ("eieio");
+#endif
 		*dbuf++ = *pbuf;
+#ifndef CONFIG_PXA_PCMCIA
 		__asm__ volatile ("eieio");
+#endif
 		*dbuf++ = *pbuf;
 	}
 #else	/* CONFIG_HMI10 */
@@ -1076,6 +1094,7 @@
 			return;
 		}
 #else
+		printf("id failed since competion code is %x\n",c);
 		return;
 #endif	/* CONFIG_AMIGAONEG3SE */
 	}
@@ -1576,7 +1595,7 @@
 #define AT_PRINTF(fmt,args...)
 #endif
 
-#ifdef __PPC__
+#if defined(__PPC__) || defined(CONFIG_PXA_PCMCIA)
 /* since ATAPI may use commands with not 4 bytes alligned length
  * we have our own transfer functions, 2 bytes alligned */
 static void
@@ -1588,8 +1607,13 @@
 
 	pbuf = (ushort *)(ATA_CURR_BASE(dev)+ATA_DATA_REG);
 	dbuf = (ushort *)sect_buf;
+
+	PRINTF("in output data shorts base for read is %lx\n", (unsigned long) pbuf);
+
 	while (shorts--) {
+#ifndef CONFIG_PXA_PCMCIA
 		__asm__ volatile ("eieio");
+#endif
 		*pbuf = *dbuf++;
 	}
 #else	/* CONFIG_HMI10 */
@@ -1615,10 +1639,16 @@
 	ushort	*dbuf;
 	volatile ushort	*pbuf;
 
+
 	pbuf = (ushort *)(ATA_CURR_BASE(dev)+ATA_DATA_REG);
 	dbuf = (ushort *)sect_buf;
+
+	PRINTF("in input data shorts base for read is %lx\n", (unsigned long) pbuf);
+
 	while (shorts--) {
+#ifndef CONFIG_PXA_PCMCIA
 		__asm__ volatile ("eieio");
+#endif
 		*dbuf++ = *pbuf;
 	}
 #else	/* CONFIG_HMI10 */
diff -u -b -B -N -r -X dodiff.not u-boot.orig/common/cmd_pcmcia.c u-boot/common/cmd_pcmcia.c
--- u-boot.orig/common/cmd_pcmcia.c	2004-03-25 20:29:40.000000000 +0100
+++ u-boot/common/cmd_pcmcia.c	2004-04-01 11:49:15.594458134 +0200
@@ -48,8 +48,6 @@
  * They are maximum 64KByte each...
  */
 
-/* #define DEBUG	1	*/
-
 /*
  * PCMCIA support
  */
@@ -63,6 +61,9 @@
 #if defined(CONFIG_LWMON)
 #include <i2c.h>
 #endif
+#ifdef CONFIG_PXA_PCMCIA
+#include <asm/arch/pxa-regs.h>
+#endif
 
 #if (CONFIG_COMMANDS & CFG_CMD_PCMCIA) || \
     ((CONFIG_COMMANDS & CFG_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD))
@@ -86,7 +87,7 @@
 static int  hardware_enable (int slot);
 static int  voltage_set(int slot, int vcc, int vpp);
 
-#ifndef	CONFIG_I82365
+#if (! defined(CONFIG_I82365)) && (! defined(CONFIG_PXA_PCMCIA))
 static u_int m8xx_get_graycode(u_int size);
 #endif	/* CONFIG_I82365 */
 #if 0
@@ -95,6 +96,8 @@
 
 /* -------------------------------------------------------------------- */
 
+#ifndef CONFIG_PXA_PCMCIA
+
 /* look up table for pgcrx registers */
 
 static u_int *pcmcia_pgcrx[2] = {
@@ -106,13 +109,15 @@
 
 #endif /* CONFIG_I82365 */
 
-#ifdef CONFIG_IDE_8xx_PCCARD
+#if defined(CONFIG_IDE_8xx_PCCARD)  || defined(CONFIG_PXA_PCMCIA)
 static void print_funcid (int func);
 static void print_fixed  (volatile uchar *p);
 static int  identify     (volatile uchar *p);
 static int  check_ide_device (int slot);
 #endif	/* CONFIG_IDE_8xx_PCCARD */
 
+#endif
+
 const char *indent = "\t   ";
 
 /* -------------------------------------------------------------------- */
@@ -160,6 +165,8 @@
 }
 #else
 
+#ifndef CONFIG_PXA_PCMCIA
+
 #ifdef CONFIG_HMI10
 # define  HMI10_FRAM_TIMING	(PCMCIA_SHT(2) | PCMCIA_SST(2) | PCMCIA_SL(4))
 #endif
@@ -280,8 +287,106 @@
 	}
 	return (rc);
 }
+
+#endif / CONFIG_PXA_PCMCIA */
+
 #endif /* CONFIG_I82365 */
 
+#ifdef CONFIG_PXA_PCMCIA
+
+static int hardware_enable (int slot)
+{
+	return 0;	/* No hardware to enable */
+}
+
+static int hardware_disable(int slot)
+{
+	return 0;	/* No hardware to disable */
+}
+
+static int voltage_set(int slot, int vcc, int vpp)
+{
+	return 0;
+}
+
+void msWait(unsigned msVal) 
+{
+    udelay(msVal*1000);
+}
+
+int pcmcia_on (void)
+{
+  unsigned int reg_arr[] = {
+    0x48000028, CFG_MCMEM0_VAL,
+    0x4800002c, CFG_MCMEM1_VAL,
+    0x48000030, CFG_MCATT0_VAL,
+    0x48000034, CFG_MCATT1_VAL,
+    0x48000038, CFG_MCIO0_VAL,
+    0x4800003c, CFG_MCIO1_VAL,
+    
+    0,0
+  };
+  int i, rc;
+#ifdef CONFIG_EXADRON1
+  int cardDetect;
+  volatile unsigned int *v_pBCRReg = (volatile unsigned int *) 0x08000000; 
+#endif
+  
+  debug("%s\n", __FUNCTION__);
+
+  i = 0;
+  while (reg_arr[i])
+    * ( (volatile unsigned int *) reg_arr[i++]) |= reg_arr[i++];
+  udelay(1000);
+
+  debug("%s: programmed mem controller \n", __FUNCTION__);
+
+#ifdef CONFIG_EXADRON1
+
+//define useful BCR masks
+#define BCR_CF_INIT_VAL  		    0x00007230
+#define BCR_CF_PWRON_BUSOFF_RESETOFF_VAL    0x00007231
+#define BCR_CF_PWRON_BUSOFF_RESETON_VAL     0x00007233
+#define BCR_CF_PWRON_BUSON_RESETON_VAL      0x00007213
+#define BCR_CF_PWRON_BUSON_RESETOFF_VAL     0x00007211
+
+  /* we see from the GPIO bit if the card is present */
+  cardDetect = ! (GPLR0 & GPIO_bit(14));
+  
+  if (cardDetect) {
+    printf("No PCMCIA card found!\n");
+  }
+
+  /* reset the card via the BCR line */
+  *v_pBCRReg = (unsigned) BCR_CF_INIT_VAL; 				
+  msWait(500);
+	    
+  *v_pBCRReg = (unsigned) BCR_CF_PWRON_BUSOFF_RESETOFF_VAL;      
+  msWait(500);
+
+  *v_pBCRReg = (unsigned) BCR_CF_PWRON_BUSOFF_RESETON_VAL;   
+  msWait(500);
+	
+  *v_pBCRReg = (unsigned) BCR_CF_PWRON_BUSON_RESETON_VAL;          
+  msWait(500);
+        
+  *v_pBCRReg = (unsigned) BCR_CF_PWRON_BUSON_RESETOFF_VAL;   
+  msWait(1500);
+
+  // enable address bus
+  GPCR1 = 0x01;
+  // and the first CF slot
+  MECR = 0x00000002;
+
+#endif /* EXADRON 1 */
+  
+  rc = check_ide_device(0);	/* use just slot 0 */
+
+  return rc;
+}
+
+#endif /* CONFIG_PXA_PCMCIA */
+
 /* -------------------------------------------------------------------- */
 
 #if (CONFIG_COMMANDS & CFG_CMD_PCMCIA)
@@ -296,6 +401,9 @@
 	return 0;
 }
 #else
+
+#ifndef CONFIG_PXA_PCMCIA
+
 static int pcmcia_off (void)
 {
 	int i;
@@ -327,13 +435,23 @@
 	hardware_disable(_slot_);
 	return 0;
 }
+
+#endif /* CONFIG_PXA_PCMCIA */
+
 #endif /* CONFIG_I82365 */
 
+#ifdef CONFIG_PXA_PCMCIA
+static int pcmcia_off (void)
+{
+  return 0;
+}
+#endif
+
 #endif	/* CFG_CMD_PCMCIA */
 
 /* -------------------------------------------------------------------- */
 
-#ifdef CONFIG_IDE_8xx_PCCARD
+#if defined(CONFIG_IDE_8xx_PCCARD) || defined(CONFIG_PXA_PCMCIA)
 
 #define	MAX_TUPEL_SZ	512
 #define MAX_FEATURES	4
@@ -2370,7 +2488,7 @@
 
 /* -------------------------------------------------------------------- */
 
-#ifndef	CONFIG_I82365
+#if ( ! defined(CONFIG_I82365) && ! defined(CONFIG_PXA_PCMCIA) )
 
 static u_int m8xx_get_graycode(u_int size)
 {
@@ -2444,7 +2562,7 @@
 
 /* -------------------------------------------------------------------- */
 
-#ifdef CONFIG_IDE_8xx_PCCARD
+#if defined(CONFIG_IDE_8xx_PCCARD) || defined(CONFIG_PXA_PCMCIA)
 static void print_funcid (int func)
 {
 	puts (indent);
@@ -2486,7 +2604,7 @@
 
 /* -------------------------------------------------------------------- */
 
-#ifdef CONFIG_IDE_8xx_PCCARD
+#if defined(CONFIG_IDE_8xx_PCCARD) || defined(CONFIG_PXA_PCMCIA)
 static void print_fixed (volatile uchar *p)
 {
 	if (p == NULL)
@@ -2544,7 +2662,7 @@
 
 /* -------------------------------------------------------------------- */
 
-#ifdef CONFIG_IDE_8xx_PCCARD
+#if defined(CONFIG_IDE_8xx_PCCARD) || defined(CONFIG_PXA_PCMCIA)
 
 #define MAX_IDENT_CHARS		64
 #define	MAX_IDENT_FIELDS	4
diff -u -b -B -N -r -X dodiff.not u-boot.orig/doc/README.PXA_CF u-boot/doc/README.PXA_CF
--- u-boot.orig/doc/README.PXA_CF	1970-01-01 01:00:00.000000000 +0100
+++ u-boot/doc/README.PXA_CF	2004-04-01 11:54:00.865958314 +0200
@@ -0,0 +1,50 @@
+
+These are brief instructions on how to add support for CF adapters to 
+custom designed  PXA boards. You need to set the parameters in the 
+config file. This should work for most implementation especially in you
+follow the connections of the standard lubbock. Anyway just the block
+marked memory configuration should be touched since the other parameters 
+are imposed by the PXA architecture.
+
+#define CONFIG_PXA_PCMCIA 1
+#define CONFIG_PXA_IDE 1
+
+#define CONFIG_PCMCIA_SLOT_A 1	
+/* just to keep build system happy  */
+
+#define CFG_PCMCIA_MEM_ADDR     0x28000000
+#define CFG_PCMCIA_MEM_SIZE     0x10000000
+
+#define CFG_MECR_VAL		0x00000000
+#define CFG_MCMEM0_VAL		0x00004204
+#define CFG_MCMEM1_VAL		0x00000000
+#define CFG_MCATT0_VAL		0x00010504
+#define CFG_MCATT1_VAL		0x00000000
+#define CFG_MCIO0_VAL		0x00008407
+#define CFG_MCIO1_VAL		0x00000000
+/* memory configuration */
+
+#define CFG_IDE_MAXBUS		1	
+/* max. 1 IDE bus		*/
+#define CFG_IDE_MAXDEVICE	1	
+/* max. 1 drive per IDE bus	*/
+
+#define CFG_ATA_IDE0_OFFSET	0x0000
+
+#define CFG_ATA_BASE_ADDR	0x20000000
+
+/* Offset for data I/O			*/
+#define CFG_ATA_DATA_OFFSET	0x1f0
+
+/* Offset for normal register accesses	*/
+#define CFG_ATA_REG_OFFSET	0x1f0
+
+/* Offset for alternate registers	*/
+#define CFG_ATA_ALT_OFFSET	0x3f0
+	
+
+Another important point is that maybe you have to power the pcmcia 
+subsystem. This is very board specific, for an example on how to
+do it please search for CONFIG_EXADRON1 in cmd_pcmcia.c
+
+
diff -u -b -B -N -r -X dodiff.not u-boot.orig/include/fat.h u-boot/include/fat.h
--- u-boot.orig/include/fat.h	2004-02-23 20:31:01.000000000 +0100
+++ u-boot/include/fat.h	2004-03-31 15:15:46.000000000 +0200
@@ -210,4 +210,11 @@
 const char *file_getfsname(int idx);
 int fat_register_device(block_dev_desc_t *dev_desc, int part_no);
 
+#ifdef CONFIG_PXA250
+#undef FAT2CPU16
+#define FAT2CPU16(x) x
+#undef FAT2CPU32
+#define FAT2CPU32(x) x
+#endif
+
 #endif /* _FAT_H_ */
