summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOllie Lho <ollie@sis.com.tw>2005-08-03 15:04:53 +0000
committerOllie Lho <ollie@sis.com.tw>2005-08-03 15:04:53 +0000
commitf18077019037c248e2fa80f9b66aef534525f823 (patch)
tree6f1c67721ac4c323ec7bb3c8723577853639889d
parenta11a3fb25973b9fd983871a32ca94fc31c9a5c6a (diff)
downloadflashrom-f18077019037c248e2fa80f9b66aef534525f823.zip
flashrom-f18077019037c248e2fa80f9b66aef534525f823.tar.gz
Bug fix from Jonathan McDowell <noodles@earth.li>
Corresponding to flashrom svn r33 and coreboot v2 svn r1988.
-rw-r--r--w49f002u.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/w49f002u.c b/w49f002u.c
index 5325076..02667cf 100644
--- a/w49f002u.c
+++ b/w49f002u.c
@@ -42,7 +42,7 @@ int write_49f002(struct flashchip *flash, unsigned char *buf)
erase_chip_jedec(flash);
printf("Programming Page: ");
- for (i = 0; i < total_size; i++) {
+ for (i = 0; i < total_size / page_size; i++) {
/* write to the sector */
printf("%04d at address: 0x%08x ", i, i * page_size);
write_sector_jedec(bios, buf + i * page_size,
OpenPOWER on IntegriCloud