summaryrefslogtreecommitdiff
path: root/sst49lfxxxc.c
diff options
context:
space:
mode:
authorhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2010-10-10 16:10:49 +0000
committerhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2010-10-10 16:10:49 +0000
commit9ea2be2d2ae2b64591aa0ebd973563800d3e527a (patch)
treef5df1cca0b51c3227a47aa5968c816abcba49682 /sst49lfxxxc.c
parent7f2ac0c4c6c40f475e790cc29c01f5427bd0c511 (diff)
downloadflashrom-9ea2be2d2ae2b64591aa0ebd973563800d3e527a.tar.gz
Simplify calls to inner write functions. No behavioural changes, just
equivalence transformations. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1209 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'sst49lfxxxc.c')
-rw-r--r--sst49lfxxxc.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sst49lfxxxc.c b/sst49lfxxxc.c
index ec7d3da..c682be3 100644
--- a/sst49lfxxxc.c
+++ b/sst49lfxxxc.c
@@ -78,15 +78,10 @@ int erase_sector_49lfxxxc(struct flashchip *flash, unsigned int address, unsigne
int write_49lfxxxc(struct flashchip *flash, uint8_t *buf)
{
- int i;
- int total_size = flash->total_size * 1024;
- int page_size = flash->page_size;
chipaddr bios = flash->virtual_memory;
write_lockbits_49lfxxxc(flash, 0);
- for (i = 0; i < total_size / page_size; i++) {
- write_page_82802ab(flash, buf + i * page_size, i * page_size, page_size);
- }
+ write_page_82802ab(flash, buf, 0, flash->total_size * 1024);
chip_writeb(0xFF, bios);