diff -urN -x CVS u-boot/common/cmd_ide.c u-boot-i386/common/cmd_ide.c
--- u-boot/common/cmd_ide.c	Mon Apr 28 00:53:11 2003
+++ u-boot-i386/common/cmd_ide.c	Wed Apr 30 13:19:53 2003
@@ -118,35 +118,25 @@
 #endif
 };
 
-#ifdef __PPC__
 #define	ATA_CURR_BASE(dev)	(CFG_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
-#endif
 
-#ifndef CONFIG_AMIGAONEG3SE
-static int	    ide_bus_ok[CFG_IDE_MAXBUS];
-#else
 static int	    ide_bus_ok[CFG_IDE_MAXBUS] = {0,};
-#endif
 
 static  block_dev_desc_t ide_dev_desc[CFG_IDE_MAXDEVICE];
 /* ------------------------------------------------------------------------- */
 
-#ifdef CONFIG_IDE_LED
-#ifndef CONFIG_KUP4K
-static void  ide_led   (uchar led, uchar status);
-#else
-extern void  ide_led   (uchar led, uchar status);
-#endif
-#else
-#ifndef CONFIG_AMIGAONEG3SE
-#define ide_led(a,b)	/* dummy */
-#else
-extern void ide_led(uchar led, uchar status);
+
+#ifdef CONFIG_AMIGAONEG3SE
 #define LED_IDE1  1
 #define LED_IDE2  2
 #define CONFIG_IDE_LED 1
 #define DEVICE_LED(x) 1
 #endif
+
+#ifdef CONFIG_IDE_LED
+void  ide_led   (uchar led, uchar status);
+#else
+#define ide_led(a,b)	/* dummy */
 #endif
 
 #ifdef CONFIG_IDE_RESET
@@ -166,9 +156,7 @@
 
 static void __inline__ ide_outb(int dev, int port, unsigned char val);
 static unsigned char __inline__ ide_inb(int dev, int port);
-#ifdef __PPC__
 static void input_swap_data(int dev, ulong *sect_buf, int words);
-#endif
 static void input_data(int dev, ulong *sect_buf, int words);
 static void output_data(int dev, ulong *sect_buf, int words);
 static void ident_cpy (unsigned char *dest, unsigned char *src, unsigned int len);
@@ -180,7 +168,7 @@
 #endif
 
 
-#ifdef CONFIG_IDE_8xx_DIRECT
+#ifdef CONFIG_IDE_8xx_DIRECT 
 static void set_pcmcia_timing (int pmode);
 #else
 #define set_pcmcia_timing(a)	/* dummy */
@@ -482,26 +470,31 @@
 #endif
 	unsigned char c;
 	int i, bus;
-#ifdef CONFIG_AMIGAONEG3SE
 	unsigned int max_bus_scan;
 	unsigned int ata_reset_time;
 	char *s;
-#endif
 
-#ifdef CONFIG_IDE_8xx_PCCARD
-	extern int pcmcia_on (void);
+#if defined(CONFIG_IDE_8xx_PCCARD) || defined (CONFIG_IDE_TI_CARDBUS)
+	extern int pcmcia_on(int ide_base_bus);
 	extern int ide_devices_found; /* Initialized in check_ide_device() */
-
+#ifndef CFG_FISRT_PCMCIA_BUS
+# define CFG_FISRT_PCMCIA_BUS 0
+#endif
+	
 	WATCHDOG_RESET();
 
 	ide_devices_found = 0;
+	for (bus=0; bus<CFG_FISRT_PCMCIA_BUS; bus++) {
+		/* non-pccard buses should be considered present */
+		ide_devices_found |= (1<<bus);
+	}
+	
 	/* initialize the PCMCIA IDE adapter card */
-	pcmcia_on();
-	if (!ide_devices_found)
-		return;
+	pcmcia_on(CFG_FISRT_PCMCIA_BUS);
 	udelay (1000000);	/* 1 s */
 #endif	/* CONFIG_IDE_8xx_PCCARD */
 
+	
 	WATCHDOG_RESET();
 
 	/* Initialize PIO timing tables */
@@ -540,22 +533,23 @@
 	 * Wait for IDE to get ready.
 	 * According to spec, this can take up to 31 seconds!
 	 */
-#ifndef CONFIG_AMIGAONEG3SE
-	for (bus=0; bus<CFG_IDE_MAXBUS; ++bus) {
-		int dev = bus * (CFG_IDE_MAXDEVICE / CFG_IDE_MAXBUS);
-#else
 	s = getenv("ide_maxbus");
 	if (s)
 	    max_bus_scan = simple_strtol(s, NULL, 10);
 	else
 	    max_bus_scan = CFG_IDE_MAXBUS;
+	
+	if (max_bus_scan > CFG_IDE_MAXBUS) {
+	    max_bus_scan = CFG_IDE_MAXBUS;
+	}
 
 	for (bus=0; bus<max_bus_scan; ++bus) {
 		int dev = bus * (CFG_IDE_MAXDEVICE / max_bus_scan);
-#endif
 
-#ifdef CONFIG_IDE_8xx_PCCARD
+#if defined(CONFIG_IDE_8xx_PCCARD) || defined (CONFIG_IDE_TI_CARDBUS)
 		/* Skip non-ide devices from probing */
+		/* This assumes a one-to-one mapping between PCMCIA slots and
+		 * IDE buses */
 		if ((ide_devices_found & (1 << bus)) == 0) {
 			ide_led ((LED_IDE1 | LED_IDE2), 0); /* LED's off */
 			continue;
@@ -570,32 +564,26 @@
 		udelay (100000);		/* 100 ms */
 		ide_outb (dev, ATA_DEV_HD, ATA_LBA | ATA_DEVICE(dev));
 		udelay (100000);		/* 100 ms */
-#ifdef CONFIG_AMIGAONEG3SE
+		
 		ata_reset_time = ATA_RESET_TIME;
 		s = getenv("ide_reset_timeout");
 		if (s) ata_reset_time = 2*simple_strtol(s, NULL, 10);
-#endif
 		i = 0;
+		
 		do {
 			udelay (10000);		/* 10 ms */
 
 			c = ide_inb (dev, ATA_STATUS);
 			i++;
-#ifdef CONFIG_AMIGAONEG3SE
+			
 			if (i > (ata_reset_time * 100)) {
-#else
-			if (i > (ATA_RESET_TIME * 100)) {
-#endif
 				puts ("** Timeout **\n");
 				ide_led ((LED_IDE1 | LED_IDE2), 0); /* LED's off */
-#ifdef CONFIG_AMIGAONEG3SE
 				/* If this is the second bus, the first one was OK */
-				if (bus != 0)
-				{
+				if (bus != 0) {
 				    ide_bus_ok[bus] = 0;
 				    goto skip_bus;
 				}
-#endif
 				return;
 			}
 			if ((i >= 100) && ((i%100)==0)) {
@@ -618,9 +606,7 @@
 		WATCHDOG_RESET();
 	}
 
-#ifdef CONFIG_AMIGAONEG3SE
       skip_bus:
-#endif
 	putc ('\n');
 
 	ide_led ((LED_IDE1 | LED_IDE2), 0);	/* LED's off	*/
@@ -765,7 +751,7 @@
 static void __inline__
 ide_outb(int dev, int port, unsigned char val)
 {
-	outb(val, port);
+	outb(val, ATA_CURR_BASE(dev)+port);
 }
 #endif	/* __PPC__ */
 
@@ -787,7 +773,7 @@
 static unsigned char __inline__
 ide_inb(int dev, int port)
 {
-	return inb(port);
+	return inb(ATA_CURR_BASE(dev)+port);
 }
 #endif	/* __PPC__ */
 
@@ -800,25 +786,6 @@
 	return val;
 }
 
-#ifdef CONFIG_AMIGAONEG3SE
-static void
-output_data_short(int dev, ulong *sect_buf, int words)
-{
-	ushort	*dbuf;
-	volatile ushort	*pbuf;
-	
-	pbuf = (ushort *)(ATA_CURR_BASE(dev)+ATA_DATA_REG);
-	dbuf = (ushort *)sect_buf;
-	while (words--) {
-		__asm__ volatile ("eieio");
-		*pbuf = *dbuf++;
-		__asm__ volatile ("eieio");
-	}
-
-	if (words&1)
-	    *pbuf = 0;
-}
-#endif
 
 static void
 input_swap_data(int dev, ulong *sect_buf, int words)
@@ -832,7 +799,19 @@
 	}
 }
 #else	/* ! __PPC__ */
-#define input_swap_data(x,y,z) input_data(x,y,z)
+static void
+input_swap_data(int dev, ulong *sect_buf, int words)
+{
+	int i;
+	u16 *wb;
+	
+	insw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, words << 1);
+	for (i=0, wb=(u16*)sect_buf;i<words;i++) {
+		wb[i] = (((wb[i] & 0xff00) >> 8) | ((wb[i] & 0x00ff) << 8));
+	}
+	
+}
+
 #endif	/* __PPC__ */
 
 
@@ -858,7 +837,7 @@
 static void
 output_data(int dev, ulong *sect_buf, int words)
 {
-	outsw(ATA_DATA_REG, sect_buf, words<<1);
+	outsw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, words<<1);
 }
 #endif	/* __PPC__ */
 
@@ -878,38 +857,19 @@
 		*dbuf++ = *pbuf;
 	}
 }
+#define le_to_host32(x) ((x) << 16) | ((x) >> 16);
+
 #else	/* ! __PPC__ */
 static void
 input_data(int dev, ulong *sect_buf, int words)
 {
-	insw(ATA_DATA_REG, sect_buf, words << 1);
+	insw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, words << 1);
 }
+//#define le_to_host32(x) (x);
+#define le_to_host32(x) ((x & 0x00ff00ff) << 8) | ((x&0xff00ff00) >> 8);
 
 #endif	/* __PPC__ */
 
-#ifdef CONFIG_AMIGAONEG3SE
-static void
-input_data_short(int dev, ulong *sect_buf, int words)
-{
-	ushort	*dbuf;
-	volatile ushort	*pbuf;
-
-	pbuf = (ushort *)(ATA_CURR_BASE(dev)+ATA_DATA_REG);
-	dbuf = (ushort *)sect_buf;
-	while (words--) {
-		__asm__ volatile ("eieio");
-		*dbuf++ = *pbuf;
-		__asm__ volatile ("eieio");
-	}
-
-	if (words&1)
-	{
-	    ushort dummy;
-	    dummy = *pbuf;
-	}
-}
-#endif
-
 /* -------------------------------------------------------------------------
  */
 static void ide_ident (block_dev_desc_t *dev_desc)
@@ -918,13 +878,10 @@
 	unsigned char c;
 	hd_driveid_t *iop = (hd_driveid_t *)iobuf;
 
-#ifdef CONFIG_AMIGAONEG3SE
 	int max_bus_scan;
 	int retries = 0;
 	char *s;
-	int do_retry = 0;
-#endif
-
+	
 #if 0
 	int mode, cycle_time;
 #endif
@@ -932,7 +889,6 @@
 	device=dev_desc->dev;
 	printf ("  Device %d: ", device);
 
-#ifdef CONFIG_AMIGAONEG3SE
 	s = getenv("ide_maxbus");
 	if (s) {
 		max_bus_scan = simple_strtol(s, NULL, 10);
@@ -943,95 +899,82 @@
 		dev_desc->type=DEV_TYPE_UNKNOWN;
 		return;
 	}
-#endif
 
 	ide_led (DEVICE_LED(device), 1);	/* LED on	*/
 	/* Select device
 	 */
 	ide_outb (device, ATA_DEV_HD, ATA_LBA | ATA_DEVICE(device));
 	dev_desc->if_type=IF_TYPE_IDE;
-#ifdef CONFIG_ATAPI
-
-#ifdef CONFIG_AMIGAONEG3SE
-    do_retry = 0;
-    retries = 0;
-
-    /* Warning: This will be tricky to read */
-    while (retries <= 1)
-    {
-#endif	/* CONFIG_AMIGAONEG3SE */
-
-	/* check signature */
-	if ((ide_inb(device,ATA_SECT_CNT) == 0x01) &&
-		 (ide_inb(device,ATA_SECT_NUM) == 0x01) &&
-		 (ide_inb(device,ATA_CYL_LOW)  == 0x14) &&
-		 (ide_inb(device,ATA_CYL_HIGH) == 0xEB)) {
-		/* ATAPI Signature found */
-		dev_desc->if_type=IF_TYPE_ATAPI;
-		/* Start Ident Command
-		 */
-		ide_outb (device, ATA_COMMAND, ATAPI_CMD_IDENT);
-		/*
-		 * Wait for completion - ATAPI devices need more time
-		 * to become ready
-		 */
-		c = ide_wait (device, ATAPI_TIME_OUT);
-	}
-	else
-#endif
-	{
-		/* Start Ident Command
-		 */
-		ide_outb (device, ATA_COMMAND, ATA_CMD_IDENT);
 
-		/* Wait for completion
-		 */
-		c = ide_wait (device, IDE_TIME_OUT);
-	}
-	ide_led (DEVICE_LED(device), 0);	/* LED off	*/
 
-	if (((c & ATA_STAT_DRQ) == 0) ||
-	    ((c & (ATA_STAT_FAULT|ATA_STAT_ERR)) != 0) ) {
-#ifdef CONFIG_AMIGAONEG3SE
-		if (retries == 0) {
-			do_retry = 1;
-		} else {
+	retries = 0;
+	
+	/* Warning: This will be tricky to read */
+	while (1) {
+#ifdef CONFIG_ATAPI		
+		/* check signature */
+		if ((ide_inb(device,ATA_SECT_CNT) == 0x01) &&
+		    (ide_inb(device,ATA_SECT_NUM) == 0x01) &&
+		    (ide_inb(device,ATA_CYL_LOW)  == 0x14) &&
+		    (ide_inb(device,ATA_CYL_HIGH) == 0xEB)) {
+			/* ATAPI Signature found */
+			dev_desc->if_type=IF_TYPE_ATAPI;
+			/* Start Ident Command
+			 */
+			ide_outb (device, ATA_COMMAND, ATAPI_CMD_IDENT);
+			/*
+			 * Wait for completion - ATAPI devices need more time
+			 * to become ready
+			 */
+			c = ide_wait (device, ATAPI_TIME_OUT);
+		}
+		else
+#endif
+		{
+			/* Start Ident Command
+			 */
+			ide_outb (device, ATA_COMMAND, ATA_CMD_IDENT);
+			
+			/* Wait for completion
+			 */
+			c = ide_wait (device, IDE_TIME_OUT);
+		}
+		ide_led (DEVICE_LED(device), 0);	/* LED off	*/
+		if (((c & ATA_STAT_DRQ) != 0) &&
+		    ((c & (ATA_STAT_FAULT|ATA_STAT_ERR)) == 0) ) {
+			/* Good Drive */
+			break;
+		}
+		
+		if (retries > 1) { 
 			dev_desc->type=DEV_TYPE_UNKNOWN;
 			return;
+		}	
+		s = getenv("ide_doreset");
+		if (s && strcmp(s, "on") == 0) {
+			/* Need to soft reset the device in case it's an ATAPI...  */
+			PRINTF("Retrying...\n");
+			ide_outb (device, ATA_DEV_HD, ATA_LBA | ATA_DEVICE(device));
+			udelay(100000);
+			ide_outb (device, ATA_COMMAND, 0x08);
+			udelay (100000);	/* 100 ms */
 		}
-#else
-		dev_desc->type=DEV_TYPE_UNKNOWN;
-		return;
-#endif	/* CONFIG_AMIGAONEG3SE */
-	}
+		
 
-#ifdef CONFIG_AMIGAONEG3SE
-	s = getenv("ide_doreset");
-	if (s && strcmp(s, "on") == 0 && 1 == do_retry) {
-		/* Need to soft reset the device in case it's an ATAPI...  */
-		PRINTF("Retrying...\n");
-		ide_outb (device, ATA_DEV_HD, ATA_LBA | ATA_DEVICE(device));
-		udelay(100000);
-		ide_outb (device, ATA_COMMAND, 0x08);
-		udelay (100000);	/* 100 ms */
 		retries++;
-	} else {
-		retries = 100;
 	}
-    }	/* see above - ugly to read */
-#endif	/* CONFIG_AMIGAONEG3SE */
-
+	
 	input_swap_data (device, iobuf, ATA_SECTORWORDS);
-
+	
 	ident_cpy (dev_desc->revision, iop->fw_rev, sizeof(dev_desc->revision));
 	ident_cpy (dev_desc->vendor, iop->model, sizeof(dev_desc->vendor));
 	ident_cpy (dev_desc->product, iop->serial_no, sizeof(dev_desc->product));
-
-	if ((iop->config & 0x0080)==0x0080)
+	
+	if ((iop->config & 0x0080)==0x0080)  {
 		dev_desc->removable = 1;
-	else
+	} else {
 		dev_desc->removable = 0;
-
+	}
 #if 0
 	/*
 	 * Drive PIO mode autoselection
@@ -1059,16 +1002,17 @@
 	}
 	printf ("PIO mode to use: PIO %d\n", mode);
 #endif /* 0 */
-
+	
 #ifdef CONFIG_ATAPI
 	if (dev_desc->if_type==IF_TYPE_ATAPI) {
 		atapi_inquiry(dev_desc);
 		return;
 	}
 #endif /* CONFIG_ATAPI */
-
+	
 	/* swap shorts */
-	dev_desc->lba = (iop->lba_capacity << 16) | (iop->lba_capacity >> 16);
+	
+	dev_desc->lba = le_to_host32(iop->lba_capacity);
 	/* assuming HD */
 	dev_desc->type=DEV_TYPE_HARDDISK;
 	dev_desc->blksz=ATA_BLOCKSIZE;
@@ -1366,7 +1310,7 @@
 
 static	uchar	led_buffer = 0;		/* Buffer for current LED status	*/
 
-static void ide_led (uchar led, uchar status)
+void ide_led (uchar led, uchar status)
 {
 	uchar *led_port = LED_PORT;
 
@@ -1433,14 +1377,14 @@
 static void
 output_data_shorts(int dev, ushort *sect_buf, int shorts)
 {
-	outsw(ATA_DATA_REG, sect_buf, shorts);
+	outsw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, shorts);
 }
 
 
 static void
 input_data_shorts(int dev, ushort *sect_buf, int shorts)
 {
-	insw(ATA_DATA_REG, sect_buf, shorts);
+	insw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, shorts);
 }
 
 #endif	/* __PPC__ */
diff -urN -x CVS u-boot/common/cmd_pcmcia.c u-boot-i386/common/cmd_pcmcia.c
--- u-boot/common/cmd_pcmcia.c	Wed Mar 26 07:55:49 2003
+++ u-boot-i386/common/cmd_pcmcia.c	Tue Apr  1 16:35:16 2003
@@ -50,6 +50,8 @@
 
 /* #define DEBUG	1	*/
 
+#ifndef __I386__
+
 /*
  * PCMCIA support
  */
@@ -2450,3 +2452,4 @@
 /* -------------------------------------------------------------------- */
 
 #endif /* CFG_CMD_PCMCIA || (CFG_CMD_IDE && CONFIG_IDE_8xx_PCCARD) */
+#endif /* __I386__ */
diff -urN -x CVS u-boot/drivers/pci.c u-boot-i386/drivers/pci.c
--- u-boot/drivers/pci.c	Fri Feb 14 12:22:41 2003
+++ u-boot-i386/drivers/pci.c	Mon Apr 28 10:38:14 2003
@@ -224,6 +224,56 @@
 	return pci_find_devices(ids, index);
 }
 
+pci_dev_t pci_find_class(int wanted_class, int wanted_sub_code,
+			 int wanted_prog_if, int index)
+{
+	struct pci_controller * hose;
+	u8 class_code, sub_code, prog_if;
+	u8 header_type;
+	pci_dev_t bdf;
+	int bus, found_multi = 0;
+	
+	for (hose = hose_head; hose; hose = hose->next) {
+		for (bus = hose->first_busno; bus <= hose->last_busno; bus++) {
+			for (bdf = PCI_BDF(bus,0,0); 
+			     bdf < PCI_BDF(bus+1,0,0);
+			     bdf += PCI_BDF(0,0,1)) {
+				if (!PCI_FUNC(bdf)) {
+					pci_read_config_byte(bdf, 
+							     PCI_HEADER_TYPE, 
+							     &header_type);
+
+					found_multi = header_type & 0x80;
+				} else {
+					if (!found_multi) {
+						continue;
+					}
+				}
+				
+				pci_read_config_byte(bdf, 
+						     PCI_CLASS_CODE, 
+						     &class_code);
+				pci_read_config_byte(bdf, 
+						     PCI_CLASS_SUB_CODE, 
+						     &sub_code);
+				pci_read_config_byte(bdf, 
+						     PCI_CLASS_PROG, 
+						     &prog_if);
+				
+				if ((class_code == wanted_class || wanted_class == PCI_ANY_ID) &&
+				    (sub_code == wanted_sub_code || wanted_sub_code == PCI_ANY_ID) &&
+				    (prog_if == wanted_prog_if || wanted_prog_if == PCI_ANY_ID)) {
+					if (index <= 0) {
+						return bdf;
+					}
+					index--;
+				}
+			}
+		}
+	}
+	return -1;
+}
+
 /*
  *
  */
@@ -455,7 +505,8 @@
 		pci_hose_read_config_word(hose, dev, PCI_VENDOR_ID, &vendor);
 
 		if (vendor != 0xffff && vendor != 0x0000) {
-
+			int new_sub_bus;
+			
 			if (!PCI_FUNC(dev))
 				found_multi = header_type & 0x80;
 
@@ -468,14 +519,14 @@
 			cfg = pci_find_config(hose, class, vendor, device,
 					      PCI_BUS(dev), PCI_DEV(dev), PCI_FUNC(dev));
 			if (cfg) {
-				cfg->config_device(hose, dev, cfg);
+				new_sub_bus = cfg->config_device(hose, dev, cfg);
 #ifdef CONFIG_PCI_PNP
 			} else {
-				int n = pciauto_config_device(hose, dev);
+				new_sub_bus = pciauto_config_device(hose, dev);
 
-				sub_bus = max(sub_bus, n);
 #endif
 			}
+			sub_bus = max(sub_bus, new_sub_bus);
 			if (hose->fixup_irq)
 				hose->fixup_irq(hose, dev);
 
diff -urN -x CVS u-boot/examples/hello_world.c u-boot-i386/examples/hello_world.c
--- u-boot/examples/hello_world.c	Mon Oct  7 18:54:55 2002
+++ u-boot-i386/examples/hello_world.c	Tue Apr 15 09:53:58 2003
@@ -24,7 +24,11 @@
 #include <common.h>
 #include <syscall.h>
 
-int hello_world (int argc, char *argv[])
+#ifdef __I386__
+int main (int argc, char *argv[])
+#else
+int hello_word (int argc, char *argv[])
+#endif	
 {
 	int i;
 
diff -urN -x CVS u-boot/examples/syscall.S u-boot-i386/examples/syscall.S
--- u-boot/examples/syscall.S	Fri Feb 28 01:49:48 2003
+++ u-boot-i386/examples/syscall.S	Mon Apr 28 11:09:36 2003
@@ -76,7 +76,11 @@
 #define SYSCALL(name,n) \
 	.globl SYMBOL_NAME(name) ; \
 SYMBOL_NAME_LABEL(name)     		 ; \
-	ret
+	movl    $n, %eax ;\
+	pushl   %ebx; \
+	pushl   %ecx; \
+	int     $0x40 ;\
+
 
 #endif	/* CONFIG_I386 */
 
diff -urN -x CVS u-boot/include/flash.h u-boot-i386/include/flash.h
--- u-boot/include/flash.h	Wed Mar 26 07:55:50 2003
+++ u-boot-i386/include/flash.h	Tue Apr  1 16:36:31 2003
@@ -132,6 +132,7 @@
 #define AMD_ID_F016D	0xAD		/* 29F016  ID  ( 2 M x 8)		*/
 #define AMD_ID_F032B	0x41		/* 29F032  ID  ( 4 M x 8)		*/
 #define AMD_ID_LV116DT	0xC7		/* 29LV116DT   ( 2 M x 8, top boot sect) */
+#define AMD_ID_LV016B	0xc8		/* 29LV016 ID  ( 2 M x 8)		*/
 
 #define AMD_ID_LV400T	0x22B922B9	/* 29LV400T ID ( 4 M, top boot sector)	*/
 #define AMD_ID_LV400B	0x22BA22BA	/* 29LV400B ID ( 4 M, bottom boot sect)	*/
diff -urN -x CVS u-boot/include/i8042.h u-boot-i386/include/i8042.h
--- u-boot/include/i8042.h	Tue Sep 17 23:44:54 2002
+++ u-boot-i386/include/i8042.h	Wed Nov 20 17:05:32 2002
@@ -26,6 +26,13 @@
 #ifndef _I8042_H_
 #define _I8042_H_
 
+#ifdef __I386__
+#include <common.h>
+#include <asm/io.h>
+#define in8(p) inb(p)
+#define out8(p,v) outb(v,p)
+#endif
+
 /* defines */
 
 #define I8042_DATA_REG      (CFG_ISA_IO + 0x0060)    /* keyboard i/o buffer */
diff -urN -x CVS u-boot/include/pci.h u-boot-i386/include/pci.h
--- u-boot/include/pci.h	Tue Nov 19 12:04:21 2002
+++ u-boot-i386/include/pci.h	Wed Dec  4 13:47:30 2002
@@ -331,7 +331,7 @@
 	unsigned int dev;			/* Device number, or PCI_ANY_ID */
 	unsigned int func;			/* Function number, or PCI_ANY_ID */
 
-	void (*config_device)(struct pci_controller* hose, pci_dev_t dev,
+	int (*config_device)(struct pci_controller* hose, pci_dev_t dev,
 			      struct pci_config_table *);
 	unsigned long priv[3];
 };
@@ -462,6 +462,8 @@
 
 extern pci_dev_t pci_find_device (unsigned int vendor, unsigned int device, int index);
 extern pci_dev_t pci_find_devices (struct pci_device_id *ids, int index);
+extern pci_dev_t pci_find_class(int wanted_class, int wanted_sub_code,
+				int wanted_prog_if, int index);
 
 extern int pci_hose_config_device(struct pci_controller *hose,
 				  pci_dev_t dev,
diff -urN -x CVS u-boot/include/pcmcia.h u-boot-i386/include/pcmcia.h
--- u-boot/include/pcmcia.h	Wed Mar 26 07:55:50 2003
+++ u-boot-i386/include/pcmcia.h	Tue Apr  1 16:36:35 2003
@@ -35,6 +35,8 @@
     ((CONFIG_COMMANDS & CFG_CMD_IDE) && \
 	(defined(CONFIG_IDE_8xx_PCCARD) || defined(CONFIG_IDE_8xx_DIRECT) ) )
 
+# ifndef __I386__
+
 #if !defined(CONFIG_PCMCIA_SLOT_A) && !defined(CONFIG_PCMCIA_SLOT_B)
 
 					/* The RPX series use SLOT_B	*/
@@ -226,6 +228,7 @@
  */
 #define CFG_PCMCIA_PBR7		0
 #define CFG_PCMCIA_POR7		0
+#endif /* I386 */
 
 /**********************************************************************/
 
diff -urN -x CVS u-boot/include/ssi.h u-boot-i386/include/ssi.h
--- u-boot/include/ssi.h	Thu Jan  1 01:00:00 1970
+++ u-boot-i386/include/ssi.h	Fri Mar 28 08:48:28 2003
@@ -0,0 +1,21 @@
+
+#ifndef __SSI_H__
+#define __SSI_H__
+
+#include <asm/types.h>
+
+int ssi_set_interface(int freq, int lsb_first, int inv_clock, int inv_phase);
+u8 ssi_txrx_byte(u8 data); 
+void ssi_tx_byte(u8 data); 
+u8 ssi_rx_byte(void);
+void ssi_chip_select(int dev);
+
+
+int ssi_eeprom_probe(int dev);
+int ssi_eeprom_write(int dev, int addr, u32 data);
+u32 ssi_eeprom_read(int dev, int addr);
+
+
+
+
+#endif
diff -urN -x CVS u-boot/tools/gdb/Makefile u-boot-i386/tools/gdb/Makefile
--- u-boot/tools/gdb/Makefile	Sun Jan 27 01:56:57 2002
+++ u-boot-i386/tools/gdb/Makefile	Thu Nov 21 12:26:55 2002
@@ -35,7 +35,11 @@
 #
 # Use native tools and options
 #
+ifneq ($(BFD_ROOT_DIR),/usr)
 CPPFLAGS   = -I$(BFD_ROOT_DIR)/include
+else
+CPPFLAGS   = 
+endif
 CFLAGS     = $(HOST_CFLAGS) -O $(CPPFLAGS)
 CC	   = $(HOSTCC)
 MAKEDEPEND = makedepend
