summaryrefslogtreecommitdiffstats
path: root/sst49lfxxxc.c
diff options
context:
space:
mode:
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);
OpenPOWER on IntegriCloud