Commit 12537cc5a9cb4134e358725ca5720c434afac814
1 parent
c2642d14c9
Exists in
master
and in
54 other branches
PLU405 board update
Showing 2 changed files with 36 additions and 10 deletions Side-by-side Diff
board/esd/plu405/Makefile
board/esd/plu405/plu405.c
... | ... | @@ -26,13 +26,13 @@ |
26 | 26 | #include <command.h> |
27 | 27 | #include <malloc.h> |
28 | 28 | |
29 | -/* ------------------------------------------------------------------------- */ | |
30 | 29 | |
31 | 30 | #if 0 |
32 | 31 | #define FPGA_DEBUG |
33 | 32 | #endif |
34 | 33 | |
35 | 34 | extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); |
35 | +extern void lxt971_no_sleep(void); | |
36 | 36 | |
37 | 37 | /* fpga configuration data - gzip compressed and generated by bin2c */ |
38 | 38 | const unsigned char fpgadata[] = |
... | ... | @@ -46,6 +46,23 @@ |
46 | 46 | #include "../common/fpga.c" |
47 | 47 | |
48 | 48 | |
49 | +/* | |
50 | + * include common auto-update code (for esd boards) | |
51 | + */ | |
52 | +#include "../common/auto_update.h" | |
53 | + | |
54 | +au_image_t au_image[] = { | |
55 | + {"plu405/preinst.img", 0, -1, AU_SCRIPT}, | |
56 | + {"plu405/u-boot.img", 0xfffc0000, 0x00040000, AU_FIRMWARE}, | |
57 | + {"plu405/pImage_$(bd_type)", 0x00000000, 0x00100000, AU_NAND}, | |
58 | + {"plu405/pImage.initrd", 0x00100000, 0x00200000, AU_NAND}, | |
59 | + {"plu405/yaffsmt2.img", 0x00300000, 0x01c00000, AU_NAND}, | |
60 | + {"plu405/postinst.img", 0, 0, AU_SCRIPT}, | |
61 | +}; | |
62 | + | |
63 | +int N_AU_IMAGES = (sizeof(au_image) / sizeof(au_image[0])); | |
64 | + | |
65 | + | |
49 | 66 | /* Prototypes */ |
50 | 67 | int gunzip(void *, int, unsigned char *, unsigned long *); |
51 | 68 | |
... | ... | @@ -81,8 +98,6 @@ |
81 | 98 | } |
82 | 99 | |
83 | 100 | |
84 | -/* ------------------------------------------------------------------------- */ | |
85 | - | |
86 | 101 | int misc_init_f (void) |
87 | 102 | { |
88 | 103 | return 0; /* dummy implementation */ |
... | ... | @@ -99,7 +114,6 @@ |
99 | 114 | int index; |
100 | 115 | int i; |
101 | 116 | |
102 | -#if 1 /* test-only */ | |
103 | 117 | dst = malloc(CFG_FPGA_MAX_SIZE); |
104 | 118 | if (gunzip (dst, CFG_FPGA_MAX_SIZE, (uchar *)fpgadata, &len) != 0) { |
105 | 119 | printf ("GUNZIP ERROR - must RESET board to recover\n"); |
... | ... | @@ -179,7 +193,6 @@ |
179 | 193 | */ |
180 | 194 | *duart0_mcr = 0x08; |
181 | 195 | *duart1_mcr = 0x08; |
182 | -#endif | |
183 | 196 | |
184 | 197 | return (0); |
185 | 198 | } |
... | ... | @@ -188,7 +201,6 @@ |
188 | 201 | /* |
189 | 202 | * Check Board Identity: |
190 | 203 | */ |
191 | - | |
192 | 204 | int checkboard (void) |
193 | 205 | { |
194 | 206 | unsigned char str[64]; |
195 | 207 | |
... | ... | @@ -204,10 +216,14 @@ |
204 | 216 | |
205 | 217 | putc ('\n'); |
206 | 218 | |
219 | + /* | |
220 | + * Disable sleep mode in LXT971 | |
221 | + */ | |
222 | + lxt971_no_sleep(); | |
223 | + | |
207 | 224 | return 0; |
208 | 225 | } |
209 | 226 | |
210 | -/* ------------------------------------------------------------------------- */ | |
211 | 227 | |
212 | 228 | long int initdram (int board_type) |
213 | 229 | { |
... | ... | @@ -224,7 +240,6 @@ |
224 | 240 | return (4*1024*1024 << ((val & 0x000e0000) >> 17)); |
225 | 241 | } |
226 | 242 | |
227 | -/* ------------------------------------------------------------------------- */ | |
228 | 243 | |
229 | 244 | int testdram (void) |
230 | 245 | { |
... | ... | @@ -234,7 +249,6 @@ |
234 | 249 | return (0); |
235 | 250 | } |
236 | 251 | |
237 | -/* ------------------------------------------------------------------------- */ | |
238 | 252 | |
239 | 253 | #ifdef CONFIG_IDE_RESET |
240 | 254 | void ide_set_reset(int on) |
... | ... | @@ -263,6 +277,18 @@ |
263 | 277 | nand_probe(CFG_NAND_BASE); |
264 | 278 | if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) { |
265 | 279 | print_size(nand_dev_desc[0].totlen, "\n"); |
280 | + } | |
281 | +} | |
282 | +#endif | |
283 | + | |
284 | + | |
285 | +#ifdef CONFIG_AUTO_UPDATE_SHOW | |
286 | +void board_auto_update_show(int au_active) | |
287 | +{ | |
288 | + if (au_active) { | |
289 | + printf("\n Dies ist die board-funktion: Updating!!!\n"); | |
290 | + } else { | |
291 | + printf("\n Dies ist die board-funktion: Updating done!!!\n"); | |
266 | 292 | } |
267 | 293 | } |
268 | 294 | #endif |