summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHeiko Schocher <[email protected]>2013-06-24 18:50:40 +0200
committerScott Wood <[email protected]>2013-06-24 18:17:23 -0500
commita67cc37e698107ebe7fc89a9046105f31802972e (patch)
tree2ebaee7675ccfa9bb3c7f43df17a99a6253888cb /include
parent9b80aa8ec90d8606346573b92d098470fc320601 (diff)
dfu, nand: before write a buffer to nand, erase the nand sectors
before writing the received buffer to nand, erase the nand sectors. If not doing this, nand write fails. See for more info here: http://lists.denx.de/pipermail/u-boot/2013-June/156361.html Using the nand erase option "spread", maybe overwrite blocks on, for example another mtd partition, if the erasing range contains bad blocks. So a limit option is added to nand_erase_opts() Signed-off-by: Heiko Schocher <[email protected]> Cc: Scott Wood <[email protected]> Cc: Pantelis Antoniou <[email protected]> Cc: Lukasz Majewski <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Tom Rini <[email protected]> Signed-off-by: Scott Wood <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/nand.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/nand.h b/include/nand.h
index 26190e4137d..228d87127ca 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -125,6 +125,8 @@ struct nand_erase_options {
/* Don't include skipped bad blocks in size to be erased */
int spread;
+ /* maximum size that actual may be in order to not exceed the buf */
+ loff_t lim;
};
typedef struct nand_erase_options nand_erase_options_t;