diff options
author | Li-Ta Lo <ollie@lanl.gov> | 2004-03-27 00:18:15 +0000 |
---|---|---|
committer | Li-Ta Lo <ollie@lanl.gov> | 2004-03-27 00:18:15 +0000 |
commit | 39daaac582766e94a6f2f8ad00900e623d514d7a (patch) | |
tree | cc57154b046ac9a4c48c92f275b3ca2cb7169142 /util/flash_and_burn/flash_rom.c | |
parent | 4cd79f3f86e5b57419932917750b022989e36b0c (diff) |
removed false alarm of erase/write, use verify '-v' if you are not sure about the integrity
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1486 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flash_and_burn/flash_rom.c')
-rw-r--r-- | util/flash_and_burn/flash_rom.c | 90 |
1 files changed, 43 insertions, 47 deletions
diff --git a/util/flash_and_burn/flash_rom.c b/util/flash_and_burn/flash_rom.c index dff8d182d7..4ce5d8bdc9 100644 --- a/util/flash_and_burn/flash_rom.c +++ b/util/flash_and_burn/flash_rom.c @@ -48,47 +48,46 @@ #include "mx29f002.h" struct flashchip flashchips[] = { - {"Am29F040B", AMD_ID, AM_29F040B, NULL, 512, 64 * 1024, - probe_29f040b, erase_29f040b, write_29f040b, NULL}, - {"At29C040A", ATMEL_ID, AT_29C040A, NULL, 512, 256, - probe_jedec, erase_chip_jedec, write_jedec, NULL}, - {"Mx29f002", MX_ID, MX_29F002, NULL, 256, 64 * 1024, - probe_29f002, erase_29f002, write_29f002, NULL}, - {"SST29EE020A", SST_ID, SST_29EE020A, NULL, 256, 128, - probe_jedec, erase_chip_jedec, write_jedec, NULL}, - {"SST28SF040A", SST_ID, SST_28SF040, NULL, 512, 256, - probe_28sf040, erase_28sf040, write_28sf040, NULL}, - {"SST39SF020A", SST_ID, SST_39SF020, NULL, 256, 4096, - probe_jedec, erase_chip_jedec, write_39sf020, NULL}, - {"SST39VF020", SST_ID, SST_39VF020, NULL, 256, 4096, - probe_jedec, erase_chip_jedec, write_39sf020, NULL}, - {"SST49LF040", SST_ID, SST_49LF040, NULL, 512, 4096, - probe_jedec, erase_chip_jedec, write_49lf040, NULL}, - {"SST49LF080A", SST_ID, SST_49LF080A, NULL, 1024, 4096, - probe_jedec, erase_chip_jedec, write_49lf040, NULL}, - {"SST49LF002A", SST_ID, SST_49LF002A, NULL, 256, 4096, - probe_jedec, erase_chip_jedec, write_49lf040, NULL}, - {"SST49LF003A", SST_ID, SST_49LF003A, NULL, 384, 4096, - probe_jedec, erase_chip_jedec, write_49lf040, NULL}, - {"SST49LF004A", SST_ID, SST_49LF004A, NULL, 512, 4096, - probe_jedec, erase_chip_jedec, write_49lf040, NULL}, - {"SST49LF008A", SST_ID, SST_49LF008A, NULL, 1024, 4096, - probe_jedec, erase_chip_jedec, write_49lf040, NULL}, - {"Pm49FL004", PMC_ID, PMC_49FL004, NULL, 512, 64 * 1024, - probe_jedec, erase_chip_jedec, write_49fl004, NULL}, - {"W29C011", WINBOND_ID, W_29C011, NULL, 128, 128, - probe_jedec, erase_chip_jedec, write_jedec, NULL}, - {"W29C020C", WINBOND_ID, W_29C020C, NULL, 256, 128, - probe_jedec, erase_chip_jedec, write_jedec, NULL}, - {"W49F002U", WINBOND_ID, W_49F002U, NULL, 256, 128, - probe_jedec, erase_chip_jedec, write_49f002, NULL}, - {"M29F400BT", ST_ID, ST_M29F400BT, NULL, 512, 64 * 1024, - probe_m29f400bt, erase_m29f400bt, write_linuxbios_m29f400bt, - NULL}, - {"82802ab", 137, 173, NULL, 512, 64 * 1024, - probe_82802ab, erase_82802ab, write_82802ab, NULL}, - {"82802ac", 137, 172, NULL, 1024, 64 * 1024, - probe_82802ab, erase_82802ab, write_82802ab, NULL}, + {"Am29F040B", AMD_ID, AM_29F040B, NULL, 512, 64 * 1024, + probe_29f040b, erase_29f040b, write_29f040b, NULL}, + {"At29C040A", ATMEL_ID, AT_29C040A, NULL, 512, 256, + probe_jedec, erase_chip_jedec, write_jedec, NULL}, + {"Mx29f002", MX_ID, MX_29F002, NULL, 256, 64 * 1024, + probe_29f002, erase_29f002, write_29f002, NULL}, + {"SST29EE020A", SST_ID, SST_29EE020A, NULL, 256, 128, + probe_jedec, erase_chip_jedec, write_jedec, NULL}, + {"SST28SF040A", SST_ID, SST_28SF040, NULL, 512, 256, + probe_28sf040, erase_28sf040, write_28sf040, NULL}, + {"SST39SF020A", SST_ID, SST_39SF020, NULL, 256, 4096, + probe_jedec, erase_chip_jedec, write_39sf020,NULL}, + {"SST39VF020", SST_ID, SST_39VF020, NULL, 256, 4096, + probe_jedec, erase_chip_jedec, write_39sf020,NULL}, + {"SST49LF040", SST_ID, SST_49LF040, NULL, 512, 4096, + probe_jedec, erase_chip_jedec, write_49lf040,NULL}, + {"SST49LF080A", SST_ID, SST_49LF080A, NULL, 1024, 4096, + probe_jedec, erase_chip_jedec, write_49lf040,NULL}, + {"SST49LF002A", SST_ID, SST_49LF002A, NULL, 256, 4096, + probe_jedec, erase_chip_jedec, write_49lf040,NULL}, + {"SST49LF003A", SST_ID, SST_49LF003A, NULL, 384, 4096, + probe_jedec, erase_chip_jedec, write_49lf040,NULL}, + {"SST49LF004A", SST_ID, SST_49LF004A, NULL, 512, 4096, + probe_jedec, erase_chip_jedec, write_49lf040,NULL}, + {"SST49LF008A", SST_ID, SST_49LF008A, NULL, 1024, 4096, + probe_jedec, erase_chip_jedec, write_49lf040,NULL}, + {"Pm49FL004", PMC_ID, PMC_49FL004, NULL, 512, 64 * 1024, + probe_jedec, erase_chip_jedec, write_49fl004,NULL}, + {"W29C011", WINBOND_ID, W_29C011, NULL, 128, 128, + probe_jedec, erase_chip_jedec, write_jedec, NULL}, + {"W29C020C", WINBOND_ID, W_29C020C, NULL, 256, 128, + probe_jedec, erase_chip_jedec, write_jedec, NULL}, + {"W49F002U", WINBOND_ID, W_49F002U, NULL, 256, 128, + probe_jedec, erase_chip_jedec, write_49f002, NULL}, + {"M29F400BT", ST_ID, ST_M29F400BT, NULL, 512, 64 * 1024, + probe_m29f400bt, erase_m29f400bt, write_linuxbios_m29f400bt, NULL}, + {"82802ab", 137, 173, NULL, 512, 64 * 1024, + probe_82802ab, erase_82802ab, write_82802ab, NULL}, + {"82802ac", 137, 172, NULL, 1024, 64 * 1024, + probe_82802ab, erase_82802ab, write_82802ab, NULL}, {"MD-2802 (M-Systems DiskOnChip Millennium Module)", MSYSTEMS_ID, MSYSTEMS_MD2802, NULL, 8, 8 * 1024, @@ -110,13 +109,11 @@ struct flashchip *probe_flash(struct flashchip *flash) } while (flash->name != NULL) { - if (chip_to_probe - && strcmp(flash->name, chip_to_probe) != 0) { + if (chip_to_probe && strcmp(flash->name, chip_to_probe) != 0) { flash++; continue; } - printf("Trying %s, %d KB\n", flash->name, - flash->total_size); + printf("Trying %s, %d KB\n", flash->name, flash->total_size); size = flash->total_size * 1024; /* BUG? what happens if getpagesize() > size!? -> ``Error MMAP /dev/mem: Invalid argument'' NIKI */ @@ -225,8 +222,7 @@ int main(int argc, char *argv[]) if (optind < argc) filename = argv[optind++]; - printf - ("Calibrating timer since microsleep sucks ... takes a second\n"); + printf("Calibrating timer since microsleep sucks ... takes a second\n"); myusec_calibrate_delay(); printf("OK, calibrated, now do the deed\n"); |