projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd74280
)
nand: Fix nand_erase_opts() offset check
author
Benoît Thébaudeau
<benoit.thebaudeau@advansee.com>
Mon, 5 Nov 2012 10:16:15 +0000
(10:16 +0000)
committer
Scott Wood
<scottwood@freescale.com>
Mon, 26 Nov 2012 21:41:28 +0000
(15:41 -0600)
NAND Flash is erased by blocks, not by pages.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Scott Wood <scottwood@freescale.com>
drivers/mtd/nand/nand_util.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/nand/nand_util.c
b/drivers/mtd/nand/nand_util.c
index 3f111038f16dd8aeffbf570389e99c5e158900d8..285568316170cc8db2f5db74681d67b0bebc0717 100644
(file)
--- a/
drivers/mtd/nand/nand_util.c
+++ b/
drivers/mtd/nand/nand_util.c
@@
-80,8
+80,8
@@
int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts)
struct mtd_oob_ops oob_opts;
struct nand_chip *chip = meminfo->priv;
- if ((opts->offset & (meminfo->
writ
esize - 1)) != 0) {
- printf("Attempt to erase non
page
-aligned data\n");
+ if ((opts->offset & (meminfo->
eras
esize - 1)) != 0) {
+ printf("Attempt to erase non
block
-aligned data\n");
return -1;
}