FreeCalypso > hg > freecalypso-sw
comparison loadtools/ltflash.c @ 205:cd12d1049f91
fc-loadtool: flash ID check moved into flash info, added to erase and program
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 23 Dec 2013 18:40:04 +0000 |
parents | 61c7480b3c50 |
children | f027c6fbe37e |
comparison
equal
deleted
inserted
replaced
204:61c7480b3c50 | 205:cd12d1049f91 |
---|---|
271 bi = flash_bank_info + bank; | 271 bi = flash_bank_info + bank; |
272 printf("Flash device type: %s\n", selected_flash_device->name); | 272 printf("Flash device type: %s\n", selected_flash_device->name); |
273 printf("Bank %d base address: %08lX\n", bank, (u_long) bi->base_addr); | 273 printf("Bank %d base address: %08lX\n", bank, (u_long) bi->base_addr); |
274 printf("Bank %d total size: %lx\n", bank, (u_long) bi->total_size); | 274 printf("Bank %d total size: %lx\n", bank, (u_long) bi->total_size); |
275 printf("Sectors in bank %d: %u\n", bank, bi->nsectors); | 275 printf("Sectors in bank %d: %u\n", bank, bi->nsectors); |
276 flash_id_check(bank, 1); | |
276 if (selected_flash_device->nbanks == 2 && !bank) | 277 if (selected_flash_device->nbanks == 2 && !bank) |
277 printf("\nFlash device has 2 banks; flash2 command available\n"); | 278 printf("\nFlash device has 2 banks; flash2 command available\n"); |
278 return(0); | 279 return(0); |
279 } | 280 } |
280 | 281 |
311 return(-1); | 312 return(-1); |
312 return tpinterf_pass_output(1); | 313 return tpinterf_pass_output(1); |
313 } | 314 } |
314 | 315 |
315 extern int flashcmd_erase(); | 316 extern int flashcmd_erase(); |
316 extern int flashcmd_idcheck(); | |
317 extern int flashcmd_progbin(); | 317 extern int flashcmd_progbin(); |
318 extern int flashcmd_program_m0(); | 318 extern int flashcmd_program_m0(); |
319 extern int flashcmd_program_srec(); | 319 extern int flashcmd_program_srec(); |
320 extern int flashcmd_sectors(); | 320 extern int flashcmd_sectors(); |
321 | 321 |
326 {"blankchk", flashcmd_blankchk}, | 326 {"blankchk", flashcmd_blankchk}, |
327 {"dump2bin", flashcmd_dump2file}, | 327 {"dump2bin", flashcmd_dump2file}, |
328 {"dump2srec", flashcmd_dump2file}, | 328 {"dump2srec", flashcmd_dump2file}, |
329 {"erase", flashcmd_erase}, | 329 {"erase", flashcmd_erase}, |
330 {"help", flashcmd_help}, | 330 {"help", flashcmd_help}, |
331 {"idcheck", flashcmd_idcheck}, | |
332 {"info", flashcmd_info}, | 331 {"info", flashcmd_info}, |
333 {"program-bin", flashcmd_progbin}, | 332 {"program-bin", flashcmd_progbin}, |
334 {"program-m0", flashcmd_program_m0}, | 333 {"program-m0", flashcmd_program_m0}, |
335 {"program-srec", flashcmd_program_srec}, | 334 {"program-srec", flashcmd_program_srec}, |
336 {"quickprog", flashcmd_quickprog}, | 335 {"quickprog", flashcmd_quickprog}, |