u-boot/drivers/mtd/nand
Scott Wood 3048632251 nand erase: .spread, .part, .chip subcommands
A while back, in http://lists.denx.de/pipermail/u-boot/2009-June/054428.html,
Michele De Candia posted a patch to not count bad blocks toward the
requested size to be erased.  This is desireable when you're passing in
something like $filesize, but not when you're trying to erase a partition.

Thus, a .spread subcommand (named for consistency with
http://lists.denx.de/pipermail/u-boot/2010-August/075163.html) is introduced
to make explicit the user's desire to erase for a given amount of data,
rather than to erase a specific region of the chip.

While passing $filesize to "nand erase" is useful, accidentally passing
something like $fliesize currently produces quite unpleasant results, as the
variable evaluates to nothing and U-Boot assumes that you want to erase
the entire rest of the chip/partition.  To improve the safety of the
erase command, require the user to make explicit their intentions by
using a .part or .chip subcommand.  This is an incompatible user interface
change, but keeping compatibility would eliminate the safety gain, and IMHO
it's worth it.

While touching nand_erase_opts(), make it accept 64-bit offsets and sizes,
fix the percentage display when erase length is rounded up, eliminate
an inconsistent warning about rounding up the erase length which only
happened when the length was less than one block (rounding up for $filesize
is normal operation), and add a diagnostic if there's an attempt to erase
beginning at a non-block boundary.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11 15:10:17 -05:00
..
atmel_nand.c at91: add hwecc method for nand 2010-03-23 14:29:09 -05:00
atmel_nand_ecc.h at91: add hwecc method for nand 2010-03-23 14:29:09 -05:00
bfin_nand.c Blackfin: bfin_nand: convert to portmux framework 2010-07-13 17:50:49 -04:00
davinci_nand.c nand/davinci: make sure ECC calculation has really started 2010-09-13 14:43:05 -05:00
diskonchip.c Remove legacy NAND and disk on chip code. 2009-07-16 19:07:47 -05:00
fsl_elbc_nand.c 83xx/85xx/86xx: LBC register cleanup 2010-07-16 10:55:09 -05:00
fsl_upm.c Add wait flags to support board/chip specific delays 2009-03-23 15:53:40 -05:00
kb9202_nand.c KB9202: Add NAND support 2009-08-26 15:37:01 -05:00
kirkwood_nand.c nand: Add Marvell Kirkwood NAND driver 2009-07-08 21:20:10 +02:00
kmeter1_nand.c 83xx, kmeter1: added NAND support 2009-08-26 15:37:02 -05:00
Makefile SPEAr : nand driver support for SPEAr SoCs 2010-01-23 08:15:49 -06:00
mpc5121_nfc.c mpc512x. Micron nand flash needs a reset before a read command is issued. 2009-09-22 22:59:42 +02:00
mxc_nand.c Prepare v2010.03-rc1 2010-03-12 23:06:04 +01:00
nand.c Conditionally perform common relocation fixups 2009-10-03 10:17:57 +02:00
nand_base.c nand util: read/write: accept unaligned length 2010-10-11 15:09:23 -05:00
nand_bbt.c NAND: Update to support 64 bit device size 2009-11-13 16:56:14 -06:00
nand_ecc.c nand: Fix problem with ECC ordering for PPC4xx NDFC platforms 2009-05-23 12:51:39 +02:00
nand_ids.c NAND: add Toshiba TC58NVG0 identifier 2010-07-08 16:49:50 -05:00
nand_plat.c mtd: nand_plat: add simple GPIO framework DEV_READY option 2010-07-08 16:52:12 -05:00
nand_util.c nand erase: .spread, .part, .chip subcommands 2010-10-11 15:10:17 -05:00
ndfc.c ppc4xx: Move ppc4xx headers to powerpc include directory 2010-09-23 09:02:05 +02:00
nomadik.c nomadik/nand: fix 'ecc512' discards qualifiers from pointer target type 2009-02-22 17:56:50 +01:00
omap_gpmc.c omap3: replace all instances of gpmc config struct by one global 2009-08-08 11:34:11 +02:00
s3c64xx.c s3c64xx: move s3c64xx header files to asm-arm/arch-s3c64xx 2009-11-27 16:26:13 -06:00
s3c2410_nand.c Add a unified s3c24x0 header file 2009-11-27 16:26:13 -06:00
spr_nand.c mod change 755 => 644 for multiple files 2010-03-21 22:22:53 +01:00