summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/nand_util.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-06-03 00:16:48 +0200
committerWolfgang Denk <wd@denx.de>2008-06-03 00:16:48 +0200
commit7feb4d38ff1fdf8877f39447001ff9f6e93fa6bc (patch)
tree5ba2f3b891a37f5e9beef2710ef2f82bdbf5f0e4 /drivers/mtd/nand/nand_util.c
parente3d0d4ac0ec900543bdda141f9ada9bf6c47d011 (diff)
parentd6ac2ed893c2168738aee01579d6283af8d37045 (diff)
downloadu-boot-imx-7feb4d38ff1fdf8877f39447001ff9f6e93fa6bc.zip
u-boot-imx-7feb4d38ff1fdf8877f39447001ff9f6e93fa6bc.tar.gz
u-boot-imx-7feb4d38ff1fdf8877f39447001ff9f6e93fa6bc.tar.bz2
Merge remote branch 'u-boot-nand-flash/master'
Diffstat (limited to 'drivers/mtd/nand/nand_util.c')
-rw-r--r--drivers/mtd/nand/nand_util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index 6c5624a..c82f77b 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -153,6 +153,13 @@ int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts)
priv_nand->bbt = NULL;
}
+ if (erase_length < meminfo->erasesize) {
+ printf("Warning: Erase size 0x%08x smaller than one " \
+ "erase block 0x%08x\n",erase_length, meminfo->erasesize);
+ printf(" Erasing 0x%08x instead\n", meminfo->erasesize);
+ erase_length = meminfo->erasesize;
+ }
+
for (;
erase.addr < opts->offset + erase_length;
erase.addr += meminfo->erasesize) {