summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2006-10-29 01:12:53 +0200
committerWolfgang Denk <wd@denx.de>2006-10-29 01:12:53 +0200
commitd9831893ab2efd3dd36f948da898c83f33c4992c (patch)
tree9456126b6bf9d0664bc3f55057e603615cab728e /drivers
parent1954be6e9c9421b45d0a9d05b10356acc7563150 (diff)
parentfae684e89844856383bdf101440889557df3e6b1 (diff)
downloadu-boot-imx-d9831893ab2efd3dd36f948da898c83f33c4992c.zip
u-boot-imx-d9831893ab2efd3dd36f948da898c83f33c4992c.tar.gz
u-boot-imx-d9831893ab2efd3dd36f948da898c83f33c4992c.tar.bz2
Merge with /home/sr/git/u-boot/nand-ladis
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nand/nand_util.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/nand/nand_util.c b/drivers/nand/nand_util.c
index 7570210..10bf036 100644
--- a/drivers/nand/nand_util.c
+++ b/drivers/nand/nand_util.c
@@ -83,15 +83,8 @@ int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts)
erase.mtd = meminfo;
erase.len = meminfo->erasesize;
- if (opts->offset == 0 && opts->length == 0) {
- /* erase complete chip */
- erase.addr = 0;
- erase_length = meminfo->size;
- } else {
- /* erase specified region */
- erase.addr = opts->offset;
- erase_length = opts->length;
- }
+ erase.addr = opts->offset;
+ erase_length = opts->length;
isNAND = meminfo->type == MTD_NANDFLASH ? 1 : 0;