diff options
author | Stefan Roese <sr@denx.de> | 2006-10-28 15:55:52 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2006-10-28 17:11:10 +0200 |
commit | 856f054410cef52d868feb330168b2a4c4091328 (patch) | |
tree | 75995d4bfa2f99852917e5ca035406dd91f6953f /drivers/nand/nand_util.c | |
parent | 07a69a18c2ecfda904231fdf23e2523ea7792eb6 (diff) | |
download | u-boot-imx-856f054410cef52d868feb330168b2a4c4091328.zip u-boot-imx-856f054410cef52d868feb330168b2a4c4091328.tar.gz u-boot-imx-856f054410cef52d868feb330168b2a4c4091328.tar.bz2 |
[PATCH] NAND: Partition name support added to NAND subsystem
chpart, nboot and NAND subsystem related commands now accept also partition
name to specify offset.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/nand/nand_util.c')
-rw-r--r-- | drivers/nand/nand_util.c | 11 |
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; |