1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 06:01:16 +02:00

Simplify calls to inner write functions

No behavioural changes, just equivalence transformations.

Corresponding to flashrom svn r1209.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
This commit is contained in:
Carl-Daniel Hailfinger
2010-10-10 16:10:49 +00:00
parent b30a5ed4af
commit 184b95f449
6 changed files with 5 additions and 53 deletions

View File

@ -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);