diff options
author | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2013-03-03 23:49:48 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2013-03-03 23:49:48 +0000 |
commit | c512eca5455f1c291d8a8cecbc721b7c5496afcc (patch) | |
tree | f1b620f41753f30ca126947b6e634156fea996cb /flashrom.c | |
parent | 226c045b74908e59dc14e2b268cc4550578975a8 (diff) | |
download | flashrom-c512eca5455f1c291d8a8cecbc721b7c5496afcc.zip flashrom-c512eca5455f1c291d8a8cecbc721b7c5496afcc.tar.gz |
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>
Diffstat (limited to 'flashrom.c')
-rw-r--r-- | flashrom.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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); |