1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-06-30 21:52:36 +02:00

Make write granularity a chip attribute

Corresponding to flashrom svn r1651.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
Stefan Tauner
2013-03-03 23:49:48 +00:00
parent 352e50b79e
commit 50d67aaa79
2 changed files with 3 additions and 3 deletions

View File

@ -1273,7 +1273,7 @@ static int erase_and_write_block_helper(struct flashctx *flash,
{
unsigned int starthere = 0, lenhere = 0;
int ret = 0, skip = 1, writecount = 0;
enum write_granularity gran = write_gran_256bytes; /* FIXME */
enum write_granularity gran = flash->chip->gran;
/* curcontents and newcontents are opaque to walk_eraseregions, and
* need to be adjusted here to keep the impression of proper abstraction
@ -1281,7 +1281,6 @@ static int erase_and_write_block_helper(struct flashctx *flash,
curcontents += start;
newcontents += start;
msg_cdbg(":");
/* FIXME: Assume 256 byte granularity for now to play it safe. */
if (need_erase(curcontents, newcontents, len, gran)) {
msg_cdbg("E");
ret = erasefn(flash, start, len);