Commit 5f535fe170e2cd90ee65922cbad1a5428d85a9e6
1 parent
b0639ca332
Exists in
master
and in
54 other branches
* Patches by Anders Larsen, 17 Sep 2003:
- fix spelling errors - set GD_FLG_DEVINIT flag only after device function pointers are valid - Allow CFG_ALT_MEMTEST on systems where address zero isn't writeable - enable 3.rd UART (ST-UART) on PXA(XScale) CPUs - trigger watchdog while waiting in serial driver
Showing 28 changed files with 76 additions and 37 deletions Side-by-side Diff
- CHANGELOG
- README
- board/at91rm9200dk/flash.c
- board/cradle/flash.c
- board/csb226/flash.c
- board/dnp1110/flash.c
- board/ep7312/flash.c
- board/impa7/flash.c
- board/innokom/flash.c
- board/lart/flash.c
- board/logodl/flash.c
- board/lubbock/flash.c
- board/ml2/flash.c
- board/mpl/vcma9/flash.c
- board/omap1510inn/flash.c
- board/omap1610inn/flash.c
- board/sc520_cdp/flash.c
- board/sc520_cdp/flash_old.c
- board/sc520_spunk/flash.c
- board/shannon/flash.c
- board/shannon/shannon.c
- board/smdk2410/flash.c
- common/cmd_mem.c
- common/console.c
- common/devices.c
- common/usb.c
- cpu/pxa/cpu.c
- cpu/pxa/serial.c
CHANGELOG
... | ... | @@ -2,6 +2,15 @@ |
2 | 2 | Changes for U-Boot 1.0.0: |
3 | 3 | ====================================================================== |
4 | 4 | |
5 | +* Patches by Anders Larsen, 17 Sep 2003: | |
6 | + - fix spelling errors | |
7 | + - set GD_FLG_DEVINIT flag only after device function pointers | |
8 | + are valid | |
9 | + - Allow CFG_ALT_MEMTEST on systems where address zero isn't | |
10 | + writeable | |
11 | + - enable 3.rd UART (ST-UART) on PXA(XScale) CPUs | |
12 | + - trigger watchdog while waiting in serial driver | |
13 | + | |
5 | 14 | * Add auto-update code for TRAB board using USB memory sticks, |
6 | 15 | support new configuration with more memory |
7 | 16 |
README
... | ... | @@ -1498,6 +1498,10 @@ |
1498 | 1498 | - CFG_ALT_MEMTEST: |
1499 | 1499 | Enable an alternate, more extensive memory test. |
1500 | 1500 | |
1501 | +- CFG_MEMTEST_SCRATCH: | |
1502 | + Scratch address used by the alternate memory test | |
1503 | + You only need to set this if address zero isn't writeable | |
1504 | + | |
1501 | 1505 | - CFG_TFTP_LOADADDR: |
1502 | 1506 | Default load address for network file downloads |
1503 | 1507 |
board/at91rm9200dk/flash.c
board/cradle/flash.c
board/csb226/flash.c
board/dnp1110/flash.c
board/ep7312/flash.c
... | ... | @@ -50,7 +50,7 @@ |
50 | 50 | if (i == 0) |
51 | 51 | flashbase = PHYS_FLASH_1; |
52 | 52 | else |
53 | - panic ("configured to many flash banks!\n"); | |
53 | + panic ("configured too many flash banks!\n"); | |
54 | 54 | for (j = 0; j < flash_info[i].sector_count; j++) { |
55 | 55 | flash_info[i].start[j] = flashbase + j * MAIN_SECT_SIZE; |
56 | 56 | } |
board/impa7/flash.c
board/innokom/flash.c
board/lart/flash.c
board/logodl/flash.c
board/lubbock/flash.c
board/ml2/flash.c
... | ... | @@ -72,7 +72,7 @@ |
72 | 72 | if (i==0) |
73 | 73 | flashbase = CFG_FLASH_BASE; |
74 | 74 | else |
75 | - panic("configured to many flash banks!\n"); | |
75 | + panic("configured too many flash banks!\n"); | |
76 | 76 | for (j = 0; j < flash_info[i].sector_count; j++) |
77 | 77 | flash_info[i].start[j]=flashbase + j * SECT_SIZE; |
78 | 78 |
board/mpl/vcma9/flash.c
board/omap1510inn/flash.c
board/omap1610inn/flash.c
board/sc520_cdp/flash.c
board/sc520_cdp/flash_old.c
board/sc520_spunk/flash.c
board/shannon/flash.c
board/shannon/shannon.c
board/smdk2410/flash.c
common/cmd_mem.c
... | ... | @@ -555,7 +555,11 @@ |
555 | 555 | vu_long temp; |
556 | 556 | vu_long anti_pattern; |
557 | 557 | vu_long num_words; |
558 | +#if defined(CFG_MEMTEST_SCRATCH) | |
559 | + vu_long *dummy = (vu_long*)CFG_MEMTEST_SCRATCH; | |
560 | +#else | |
558 | 561 | vu_long *dummy = NULL; |
562 | +#endif | |
559 | 563 | int j; |
560 | 564 | int iterations = 1; |
561 | 565 |
common/console.c
... | ... | @@ -436,6 +436,8 @@ |
436 | 436 | console_setfile (stdin, inputdev); |
437 | 437 | } |
438 | 438 | |
439 | + gd->flags |= GD_FLG_DEVINIT; /* device initialization completed */ | |
440 | + | |
439 | 441 | #ifndef CFG_CONSOLE_INFO_QUIET |
440 | 442 | /* Print information */ |
441 | 443 | printf ("In: "); |
... | ... | @@ -480,6 +482,8 @@ |
480 | 482 | /* Called after the relocation - use desired console functions */ |
481 | 483 | int console_init_r (void) |
482 | 484 | { |
485 | + DECLARE_GLOBAL_DATA_PTR; | |
486 | + | |
483 | 487 | device_t *inputdev = NULL, *outputdev = NULL; |
484 | 488 | int i, items = ListNumItems (devlist); |
485 | 489 | |
... | ... | @@ -513,6 +517,8 @@ |
513 | 517 | if (inputdev != NULL) { |
514 | 518 | console_setfile (stdin, inputdev); |
515 | 519 | } |
520 | + | |
521 | + gd->flags |= GD_FLG_DEVINIT; /* device initialization completed */ | |
516 | 522 | |
517 | 523 | #ifndef CFG_CONSOLE_INFO_QUIET |
518 | 524 | /* Print information */ |
common/devices.c
... | ... | @@ -158,8 +158,6 @@ |
158 | 158 | |
159 | 159 | int devices_init (void) |
160 | 160 | { |
161 | - DECLARE_GLOBAL_DATA_PTR; | |
162 | - | |
163 | 161 | #ifndef CONFIG_ARM /* already relocated for current ARM implementation */ |
164 | 162 | ulong relocation_offset = gd->reloc_off; |
165 | 163 | int i; |
... | ... | @@ -194,8 +192,6 @@ |
194 | 192 | drv_logbuff_init (); |
195 | 193 | #endif |
196 | 194 | drv_system_init (); |
197 | - | |
198 | - gd-> flags |= GD_FLG_DEVINIT; /* device initialization done */ | |
199 | 195 | |
200 | 196 | return (0); |
201 | 197 | } |
common/usb.c
... | ... | @@ -595,7 +595,7 @@ |
595 | 595 | int i; |
596 | 596 | USB_PRINTF("New Device %d\n",dev_index); |
597 | 597 | if(dev_index==USB_MAX_DEVICE) { |
598 | - printf("ERROR, to many USB Devices max=%d\n",USB_MAX_DEVICE); | |
598 | + printf("ERROR, too many USB Devices, max=%d\n",USB_MAX_DEVICE); | |
599 | 599 | return NULL; |
600 | 600 | } |
601 | 601 | usb_dev[dev_index].devnum=dev_index+1; /* default Address is 0, real addresses start with 1 */ |
cpu/pxa/cpu.c
cpu/pxa/serial.c
... | ... | @@ -29,6 +29,7 @@ |
29 | 29 | */ |
30 | 30 | |
31 | 31 | #include <common.h> |
32 | +#include <watchdog.h> | |
32 | 33 | #include <asm/arch/pxa-regs.h> |
33 | 34 | |
34 | 35 | void serial_setbrg (void) |
... | ... | @@ -38,7 +39,7 @@ |
38 | 39 | unsigned int quot = 0; |
39 | 40 | |
40 | 41 | if (gd->baudrate == 1200) |
41 | - quot = 192; | |
42 | + quot = 768; | |
42 | 43 | else if (gd->baudrate == 9600) |
43 | 44 | quot = 96; |
44 | 45 | else if (gd->baudrate == 19200) |
... | ... | @@ -53,7 +54,6 @@ |
53 | 54 | hang (); |
54 | 55 | |
55 | 56 | #ifdef CONFIG_FFUART |
56 | - | |
57 | 57 | CKEN |= CKEN6_FFUART; |
58 | 58 | |
59 | 59 | FFIER = 0; /* Disable for now */ |
60 | 60 | |
... | ... | @@ -82,9 +82,21 @@ |
82 | 82 | BTIER = IER_UUE; /* Enable BFUART */ |
83 | 83 | |
84 | 84 | #elif defined(CONFIG_STUART) |
85 | -#error "Bad: not implemented yet!" | |
85 | + CKEN |= CKEN5_STUART; | |
86 | + | |
87 | + STIER = 0; | |
88 | + STFCR = 0; | |
89 | + | |
90 | + /* set baud rate */ | |
91 | + STLCR = LCR_DLAB; | |
92 | + STDLL = quot & 0xff; | |
93 | + STDLH = quot >> 8; | |
94 | + STLCR = LCR_WLS0 | LCR_WLS1; | |
95 | + | |
96 | + STIER = IER_UUE; /* Enable STUART */ | |
97 | + | |
86 | 98 | #else |
87 | -#error "Bad: you didn't configured serial ..." | |
99 | +#error "Bad: you didn't configure serial ..." | |
88 | 100 | #endif |
89 | 101 | } |
90 | 102 | |
91 | 103 | |
92 | 104 | |
... | ... | @@ -109,13 +121,17 @@ |
109 | 121 | { |
110 | 122 | #ifdef CONFIG_FFUART |
111 | 123 | /* wait for room in the tx FIFO on FFUART */ |
112 | - while ((FFLSR & LSR_TEMT) == 0); | |
113 | - | |
124 | + while ((FFLSR & LSR_TEMT) == 0) | |
125 | + WATCHDOG_RESET (); /* Reset HW Watchdog, if needed */ | |
114 | 126 | FFTHR = c; |
115 | 127 | #elif defined(CONFIG_BTUART) |
116 | - while ((BTLSR & LSR_TEMT ) == 0 ); | |
128 | + while ((BTLSR & LSR_TEMT ) == 0 ) | |
129 | + WATCHDOG_RESET (); /* Reset HW Watchdog, if needed */ | |
117 | 130 | BTTHR = c; |
118 | 131 | #elif defined(CONFIG_STUART) |
132 | + while ((STLSR & LSR_TEMT ) == 0 ) | |
133 | + WATCHDOG_RESET (); /* Reset HW Watchdog, if needed */ | |
134 | + STTHR = c; | |
119 | 135 | #endif |
120 | 136 | |
121 | 137 | /* If \n, also do \r */ |
... | ... | @@ -135,6 +151,7 @@ |
135 | 151 | #elif defined(CONFIG_BTUART) |
136 | 152 | return BTLSR & LSR_DR; |
137 | 153 | #elif defined(CONFIG_STUART) |
154 | + return STLSR & LSR_DR; | |
138 | 155 | #endif |
139 | 156 | } |
140 | 157 | |
141 | 158 | |
142 | 159 | |
... | ... | @@ -146,14 +163,17 @@ |
146 | 163 | int serial_getc (void) |
147 | 164 | { |
148 | 165 | #ifdef CONFIG_FFUART |
149 | - while (!(FFLSR & LSR_DR)); | |
150 | - | |
166 | + while (!(FFLSR & LSR_DR)) | |
167 | + WATCHDOG_RESET (); /* Reset HW Watchdog, if needed */ | |
151 | 168 | return (char) FFRBR & 0xff; |
152 | 169 | #elif defined(CONFIG_BTUART) |
153 | - while (!(BTLSR & LSR_DR)); | |
154 | - | |
170 | + while (!(BTLSR & LSR_DR)) | |
171 | + WATCHDOG_RESET (); /* Reset HW Watchdog, if needed */ | |
155 | 172 | return (char) BTRBR & 0xff; |
156 | 173 | #elif defined(CONFIG_STUART) |
174 | + while (!(STLSR & LSR_DR)) | |
175 | + WATCHDOG_RESET (); /* Reset HW Watchdog, if needed */ | |
176 | + return (char) STRBR & 0xff; | |
157 | 177 | #endif |
158 | 178 | } |
159 | 179 |