mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-04-01 03:51:31 +00:00
nand: Fix nand_erase_opts() offset check
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>
This commit is contained in:
parent
bd74280d62
commit
8156f732ee
1 changed files with 2 additions and 2 deletions
|
@ -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 mtd_oob_ops oob_opts;
|
||||||
struct nand_chip *chip = meminfo->priv;
|
struct nand_chip *chip = meminfo->priv;
|
||||||
|
|
||||||
if ((opts->offset & (meminfo->writesize - 1)) != 0) {
|
if ((opts->offset & (meminfo->erasesize - 1)) != 0) {
|
||||||
printf("Attempt to erase non page-aligned data\n");
|
printf("Attempt to erase non block-aligned data\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue