aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2015-09-03 17:47:07 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-09-07 14:18:06 +1000
commitba98f282aee64a24d3c949ed34ff66d362fcf4c9 (patch)
tree26377d184974500f206e8fb78b3e1fea0ec759c4 /external
parentcc65fb88f8a360c8744ac9459eea2ebd98966244 (diff)
downloadskiboot-ba98f282aee64a24d3c949ed34ff66d362fcf4c9.zip
skiboot-ba98f282aee64a24d3c949ed34ff66d362fcf4c9.tar.gz
skiboot-ba98f282aee64a24d3c949ed34ff66d362fcf4c9.tar.bz2
libflash/blocklevel: Smarten up blocklevel_smart_write()
Blocklevel_smart_write() can write in a smart fashion which avoids the need for the caller to erase the flash before writing, except it never actually does the erase if it needs to. Furthermore, a very simple optimisation can be made where it should detect if it doesn't actually need to clear the flash, but still needs to write. This optimisation is from flash_smart_write(), which, for reasons, should continue to exist at least for now. In the process, this also addresses a bug. blocklevel_smart_write() operates on erase block covered by the write, detects to see if an erase needs to be performed and if so, performs the erase and then performs the write. Currently blocklevel_smart_write() won't detect that a write can span two erase blocks and that it should split this process in two. This patch fixes that. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
0 files changed, 0 insertions, 0 deletions