Changes since U-Boot 1.0.0:
======================================================================
+* Patch by Pierre Aubert, 24 Nov 2003:
+ - add a return value for the fpga command
+ - add ide_preinit() function called in ide_init if CONFIG_IDE_PREINIT
+ is defined. If ide_preinit fails, ide_init is aborted.
+ - fix an endianess problem in fat.h
+
* Patch by Wolter Kamphuis, 05 Dec 2003:
Add support for SNMC's QS850/QS823/QS860T boards
#########################################################################
# U-Boot objects....order is important (i.e. start must be first)
-OBJS = cpu/$(CPU)/start.o
+OBJS = cpu/$(CPU)/start.o
ifeq ($(CPU),i386)
-OBJS += cpu/$(CPU)/start16.o
-OBJS += cpu/$(CPU)/reset.o
+OBJS += cpu/$(CPU)/start16.o
+OBJS += cpu/$(CPU)/reset.o
endif
ifeq ($(CPU),ppc4xx)
-OBJS += cpu/$(CPU)/resetvec.o
+OBJS += cpu/$(CPU)/resetvec.o
endif
ifeq ($(CPU),mpc85xx)
OBJS += cpu/$(CPU)/resetvec.o
endif
-LIBS = board/$(BOARDDIR)/lib$(BOARD).a
+LIBS = lib_generic/libgeneric.a
+LIBS += board/$(BOARDDIR)/lib$(BOARD).a
LIBS += cpu/$(CPU)/lib$(CPU).a
LIBS += lib_$(ARCH)/lib$(ARCH).a
LIBS += fs/jffs2/libjffs2.a fs/fdos/libfdos.a fs/fat/libfat.a
LIBS += drivers/sk98lin/libsk98lin.a
LIBS += post/libpost.a post/cpu/libcpu.a
LIBS += common/libcommon.a
-LIBS += lib_generic/libgeneric.a
+.PHONY : $(LIBS)
# Add GCC lib
PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
$(MAKE) -C `dirname $@`
$(SUBDIRS):
- @echo "#### MAKE $@ ####"
$(MAKE) -C $@ all
gdbtools:
* check whether a storage device is attached (assume that it's
* a USB memory stick, since nothing else should be attached).
*/
- au_usb_stor_curr_dev = usb_stor_scan(1);
+ au_usb_stor_curr_dev = usb_stor_scan(0);
if (au_usb_stor_curr_dev == -1) {
debug ("No device found. Not initialized?\n");
return -1;
void *fpga_data = NULL;
char *devstr = getenv("fpga");
char *datastr = getenv("fpgadata");
+ int rc = FPGA_FAIL;
if ( devstr ) dev = (int)simple_strtoul( devstr, NULL, 16 );
if ( datastr ) fpga_data = (void *)simple_strtoul( datastr, NULL, 16 );
break;
case FPGA_INFO:
- fpga_info( dev );
+ rc = fpga_info( dev );
break;
case FPGA_LOAD:
- fpga_load( dev, fpga_data, data_size );
+ rc = fpga_load( dev, fpga_data, data_size );
break;
case FPGA_DUMP:
- fpga_dump( dev, fpga_data, data_size );
+ rc = fpga_dump( dev, fpga_data, data_size );
break;
default:
fpga_usage( cmdtp );
break;
}
- return 0;
+ return (rc);
}
static void fpga_usage ( cmd_tbl_t *cmdtp )
unsigned int ata_reset_time;
char *s;
#endif
+#ifdef CONFIG_IDE_8xx_PCCARD
+ extern int pcmcia_on (void);
+ extern int ide_devices_found; /* Initialized in check_ide_device() */
+#endif /* CONFIG_IDE_8xx_PCCARD */
+
+#ifdef CONFIG_IDE_PREINIT
+ WATCHDOG_RESET();
+
+ if (ide_preinit ()) {
+ puts ("ide_preinit failed\n");
+ return;
+ }
+#endif /* CONFIG_IDE_PREINIT */
#ifdef CONFIG_IDE_8xx_PCCARD
extern int pcmcia_on (void);
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",
+ dev, port, val, (ATA_CURR_BASE(dev)+port));
+
/* Ensure I/O operations complete */
__asm__ volatile("eieio");
*((uchar *)(ATA_CURR_BASE(dev)+port)) = val;
-#if 0
- printf ("ide_outb: 0x%08lx <== 0x%02x\n", ATA_CURR_BASE(dev)+port, val);
-#endif
}
#else /* ! __PPC__ */
static void __inline__
/* Ensure I/O operations complete */
__asm__ volatile("eieio");
val = *((uchar *)(ATA_CURR_BASE(dev)+port));
-#if 0
- printf ("ide_inb: 0x%08lx ==> 0x%02x\n", ATA_CURR_BASE(dev)+port, val);
-#endif
+ PRINTF ("ide_inb (dev= %d, port= %d) : @ 0x%08lx -> 0x%02x\n",
+ dev, port, (ATA_CURR_BASE(dev)+port), val);
return (val);
}
#else /* ! __PPC__ */
* 8-bit (register) and 16-bit (data) accesses might use different
* address spaces. This is implemented by the following definitions.
*/
+#ifndef CFG_ATA_STRIDE
+#define CFG_ATA_STRIDE 1
+#endif
-#define ATA_IO_DATA(x) (CFG_ATA_DATA_OFFSET+(x))
-#define ATA_IO_REG(x) (CFG_ATA_REG_OFFSET +(x))
-#define ATA_IO_ALT(x) (CFG_ATA_ALT_OFFSET +(x))
+#define ATA_IO_DATA(x) (CFG_ATA_DATA_OFFSET+((x) * CFG_ATA_STRIDE))
+#define ATA_IO_REG(x) (CFG_ATA_REG_OFFSET +((x) * CFG_ATA_STRIDE))
+#define ATA_IO_ALT(x) (CFG_ATA_ALT_OFFSET +((x) * CFG_ATA_STRIDE))
/*
* I/O Register Descriptions
#define FAT2CPU16 le16_to_cpu
#define FAT2CPU32 le32_to_cpu
#else
-#if 1
+#if __LITTLE_ENDIAN
#define FAT2CPU16(x) (x)
#define FAT2CPU32(x) (x)
#else