Commit 9fd5e31fe0245c44a11d35a8603bb6b25c97b5c8
1 parent
3bbc899fc0
Exists in
master
and in
54 other branches
* 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
Showing 7 changed files with 44 additions and 22 deletions Side-by-side Diff
CHANGELOG
... | ... | @@ -2,6 +2,12 @@ |
2 | 2 | Changes since U-Boot 1.0.0: |
3 | 3 | ====================================================================== |
4 | 4 | |
5 | +* Patch by Pierre Aubert, 24 Nov 2003: | |
6 | + - add a return value for the fpga command | |
7 | + - add ide_preinit() function called in ide_init if CONFIG_IDE_PREINIT | |
8 | + is defined. If ide_preinit fails, ide_init is aborted. | |
9 | + - fix an endianess problem in fat.h | |
10 | + | |
5 | 11 | * Patch by Wolter Kamphuis, 05 Dec 2003: |
6 | 12 | Add support for SNMC's QS850/QS823/QS860T boards |
7 | 13 |
Makefile
... | ... | @@ -80,19 +80,20 @@ |
80 | 80 | ######################################################################### |
81 | 81 | # U-Boot objects....order is important (i.e. start must be first) |
82 | 82 | |
83 | -OBJS = cpu/$(CPU)/start.o | |
83 | +OBJS = cpu/$(CPU)/start.o | |
84 | 84 | ifeq ($(CPU),i386) |
85 | -OBJS += cpu/$(CPU)/start16.o | |
86 | -OBJS += cpu/$(CPU)/reset.o | |
85 | +OBJS += cpu/$(CPU)/start16.o | |
86 | +OBJS += cpu/$(CPU)/reset.o | |
87 | 87 | endif |
88 | 88 | ifeq ($(CPU),ppc4xx) |
89 | -OBJS += cpu/$(CPU)/resetvec.o | |
89 | +OBJS += cpu/$(CPU)/resetvec.o | |
90 | 90 | endif |
91 | 91 | ifeq ($(CPU),mpc85xx) |
92 | 92 | OBJS += cpu/$(CPU)/resetvec.o |
93 | 93 | endif |
94 | 94 | |
95 | -LIBS = board/$(BOARDDIR)/lib$(BOARD).a | |
95 | +LIBS = lib_generic/libgeneric.a | |
96 | +LIBS += board/$(BOARDDIR)/lib$(BOARD).a | |
96 | 97 | LIBS += cpu/$(CPU)/lib$(CPU).a |
97 | 98 | LIBS += lib_$(ARCH)/lib$(ARCH).a |
98 | 99 | LIBS += fs/jffs2/libjffs2.a fs/fdos/libfdos.a fs/fat/libfat.a |
... | ... | @@ -104,7 +105,7 @@ |
104 | 105 | LIBS += drivers/sk98lin/libsk98lin.a |
105 | 106 | LIBS += post/libpost.a post/cpu/libcpu.a |
106 | 107 | LIBS += common/libcommon.a |
107 | -LIBS += lib_generic/libgeneric.a | |
108 | +.PHONY : $(LIBS) | |
108 | 109 | |
109 | 110 | # Add GCC lib |
110 | 111 | PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc |
... | ... | @@ -150,7 +151,6 @@ |
150 | 151 | $(MAKE) -C `dirname $@` |
151 | 152 | |
152 | 153 | $(SUBDIRS): |
153 | - @echo "#### MAKE $@ ####" | |
154 | 154 | $(MAKE) -C $@ all |
155 | 155 | |
156 | 156 | gdbtools: |
board/trab/auto_update.c
... | ... | @@ -468,7 +468,7 @@ |
468 | 468 | * check whether a storage device is attached (assume that it's |
469 | 469 | * a USB memory stick, since nothing else should be attached). |
470 | 470 | */ |
471 | - au_usb_stor_curr_dev = usb_stor_scan(1); | |
471 | + au_usb_stor_curr_dev = usb_stor_scan(0); | |
472 | 472 | if (au_usb_stor_curr_dev == -1) { |
473 | 473 | debug ("No device found. Not initialized?\n"); |
474 | 474 | return -1; |
common/cmd_fpga.c
... | ... | @@ -70,6 +70,7 @@ |
70 | 70 | void *fpga_data = NULL; |
71 | 71 | char *devstr = getenv("fpga"); |
72 | 72 | char *datastr = getenv("fpgadata"); |
73 | + int rc = FPGA_FAIL; | |
73 | 74 | |
74 | 75 | if ( devstr ) dev = (int)simple_strtoul( devstr, NULL, 16 ); |
75 | 76 | if ( datastr ) fpga_data = (void *)simple_strtoul( datastr, NULL, 16 ); |
76 | 77 | |
77 | 78 | |
... | ... | @@ -106,15 +107,15 @@ |
106 | 107 | break; |
107 | 108 | |
108 | 109 | case FPGA_INFO: |
109 | - fpga_info( dev ); | |
110 | + rc = fpga_info( dev ); | |
110 | 111 | break; |
111 | 112 | |
112 | 113 | case FPGA_LOAD: |
113 | - fpga_load( dev, fpga_data, data_size ); | |
114 | + rc = fpga_load( dev, fpga_data, data_size ); | |
114 | 115 | break; |
115 | 116 | |
116 | 117 | case FPGA_DUMP: |
117 | - fpga_dump( dev, fpga_data, data_size ); | |
118 | + rc = fpga_dump( dev, fpga_data, data_size ); | |
118 | 119 | break; |
119 | 120 | |
120 | 121 | default: |
... | ... | @@ -122,7 +123,7 @@ |
122 | 123 | fpga_usage( cmdtp ); |
123 | 124 | break; |
124 | 125 | } |
125 | - return 0; | |
126 | + return (rc); | |
126 | 127 | } |
127 | 128 | |
128 | 129 | static void fpga_usage ( cmd_tbl_t *cmdtp ) |
common/cmd_ide.c
... | ... | @@ -486,7 +486,20 @@ |
486 | 486 | unsigned int ata_reset_time; |
487 | 487 | char *s; |
488 | 488 | #endif |
489 | +#ifdef CONFIG_IDE_8xx_PCCARD | |
490 | + extern int pcmcia_on (void); | |
491 | + extern int ide_devices_found; /* Initialized in check_ide_device() */ | |
492 | +#endif /* CONFIG_IDE_8xx_PCCARD */ | |
489 | 493 | |
494 | +#ifdef CONFIG_IDE_PREINIT | |
495 | + WATCHDOG_RESET(); | |
496 | + | |
497 | + if (ide_preinit ()) { | |
498 | + puts ("ide_preinit failed\n"); | |
499 | + return; | |
500 | + } | |
501 | +#endif /* CONFIG_IDE_PREINIT */ | |
502 | + | |
490 | 503 | #ifdef CONFIG_IDE_8xx_PCCARD |
491 | 504 | extern int pcmcia_on (void); |
492 | 505 | extern int ide_devices_found; /* Initialized in check_ide_device() */ |
493 | 506 | |
... | ... | @@ -756,12 +769,12 @@ |
756 | 769 | static void __inline__ |
757 | 770 | ide_outb(int dev, int port, unsigned char val) |
758 | 771 | { |
772 | + PRINTF ("ide_outb (dev= %d, port= %d, val= 0x%02x) : @ 0x%08lx\n", | |
773 | + dev, port, val, (ATA_CURR_BASE(dev)+port)); | |
774 | + | |
759 | 775 | /* Ensure I/O operations complete */ |
760 | 776 | __asm__ volatile("eieio"); |
761 | 777 | *((uchar *)(ATA_CURR_BASE(dev)+port)) = val; |
762 | -#if 0 | |
763 | - printf ("ide_outb: 0x%08lx <== 0x%02x\n", ATA_CURR_BASE(dev)+port, val); | |
764 | -#endif | |
765 | 778 | } |
766 | 779 | #else /* ! __PPC__ */ |
767 | 780 | static void __inline__ |
... | ... | @@ -780,9 +793,8 @@ |
780 | 793 | /* Ensure I/O operations complete */ |
781 | 794 | __asm__ volatile("eieio"); |
782 | 795 | val = *((uchar *)(ATA_CURR_BASE(dev)+port)); |
783 | -#if 0 | |
784 | - printf ("ide_inb: 0x%08lx ==> 0x%02x\n", ATA_CURR_BASE(dev)+port, val); | |
785 | -#endif | |
796 | + PRINTF ("ide_inb (dev= %d, port= %d) : @ 0x%08lx -> 0x%02x\n", | |
797 | + dev, port, (ATA_CURR_BASE(dev)+port), val); | |
786 | 798 | return (val); |
787 | 799 | } |
788 | 800 | #else /* ! __PPC__ */ |
include/ata.h
... | ... | @@ -37,10 +37,13 @@ |
37 | 37 | * 8-bit (register) and 16-bit (data) accesses might use different |
38 | 38 | * address spaces. This is implemented by the following definitions. |
39 | 39 | */ |
40 | +#ifndef CFG_ATA_STRIDE | |
41 | +#define CFG_ATA_STRIDE 1 | |
42 | +#endif | |
40 | 43 | |
41 | -#define ATA_IO_DATA(x) (CFG_ATA_DATA_OFFSET+(x)) | |
42 | -#define ATA_IO_REG(x) (CFG_ATA_REG_OFFSET +(x)) | |
43 | -#define ATA_IO_ALT(x) (CFG_ATA_ALT_OFFSET +(x)) | |
44 | +#define ATA_IO_DATA(x) (CFG_ATA_DATA_OFFSET+((x) * CFG_ATA_STRIDE)) | |
45 | +#define ATA_IO_REG(x) (CFG_ATA_REG_OFFSET +((x) * CFG_ATA_STRIDE)) | |
46 | +#define ATA_IO_ALT(x) (CFG_ATA_ALT_OFFSET +((x) * CFG_ATA_STRIDE)) | |
44 | 47 | |
45 | 48 | /* |
46 | 49 | * I/O Register Descriptions |