Hi Yuri, here's the patch I'd like you to try. It will also show up at http://patchwork.coreboot.org/project/flashrom/list/
Handle LPC mode of Pm49FL004 correctly. Signed-off-by: Carl-Daniel Hailfinger <[email protected]> Index: flashrom-pm49fl004_lpc/pm49fl00x.c =================================================================== --- flashrom-pm49fl004_lpc/pm49fl00x.c (Revision 751) +++ flashrom-pm49fl004_lpc/pm49fl00x.c (Arbeitskopie) @@ -53,8 +53,10 @@ int page_size = flash->page_size; /* unprotected */ +#if 0 write_lockbits_49fl00x(flash->virtual_registers, total_size, 0, page_size); +#endif /* * erase_chip_jedec() will not work... Datasheet says @@ -74,8 +76,10 @@ printf("\n"); /* protected */ +#if 0 write_lockbits_49fl00x(flash->virtual_registers, total_size, 1, page_size); +#endif return 0; } @@ -88,29 +92,39 @@ chipaddr bios = flash->virtual_memory; /* unprotected */ +#if 0 write_lockbits_49fl00x(flash->virtual_registers, total_size, 0, page_size); +#endif - printf("Programming page: "); + printf("Programming..."); for (i = 0; i < total_size / page_size; i++) { /* erase the page before programming */ +#if 0 if (erase_block_jedec(flash, i * page_size, page_size)) { fprintf(stderr, "ERASE FAILED!\n"); return -1; } +#endif /* write to the sector */ +#if 0 printf("%04d at address: 0x%08x", i, i * page_size); +#endif write_sector_jedec(bios, buf + i * page_size, bios + i * page_size, page_size); +#if 0 printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"); fflush(stdout); +#endif } printf("\n"); /* protected */ +#if 0 write_lockbits_49fl00x(flash->virtual_registers, total_size, 1, page_size); +#endif return 0; } -- Developer quote of the week: "We are juggling too many chainsaws and flaming arrows and tigers." _______________________________________________ flashrom mailing list [email protected] http://www.flashrom.org/mailman/listinfo/flashrom
