summaryrefslogtreecommitdiffstats
path: root/w49f002u.c
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
commit8a10d5a631bddff703fdcfd5b33ac76cdc02fb63 (patch)
tree6f1c67721ac4c323ec7bb3c8723577853639889d /w49f002u.c
parent952dfce3c2cc5767b96a2130d4d3625c4d26218b (diff)
downloadast2050-flashrom-8a10d5a631bddff703fdcfd5b33ac76cdc02fb63.zip
ast2050-flashrom-8a10d5a631bddff703fdcfd5b33ac76cdc02fb63.tar.gz
Bug fix from Jonathan McDowell <noodles@earth.li>
Corresponding to flashrom svn r33 and coreboot v2 svn r1988.
Diffstat (limited to 'w49f002u.c')
-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