linux/drivers/mtd/nand
Brian Norris c46f6483d2 mtd: support reading OOB without ECC
This fixes issues with `nanddump -n' and the MEMREADOOB[64] ioctls on
hardware that performs error correction when reading only OOB data. A
driver for such hardware needs to know when we're doing a RAW vs. a
normal write, but mtd_do_read_oob does not pass such information to the
lower layers (e.g., NAND). We should pass MTD_OOB_RAW or MTD_OOB_PLACE
based on the MTD file mode.

For now, most drivers can get away with just setting:

  chip->ecc.read_oob_raw = chip->ecc.read_oob

This is done by default; but for systems that behave as described above,
you must supply your own replacement function.

This was tested with nandsim as well as on actual SLC NAND.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Jim Quinlan <jim2101024@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
2011-09-11 15:13:38 +03:00
..
gpmi-nand mtd: add the common code for GPMI-NAND controller driver 2011-09-11 15:02:18 +03:00
Kconfig mtd: add GPMI-NAND driver in the config and Makefile 2011-09-11 15:02:18 +03:00
Makefile mtd: add GPMI-NAND driver in the config and Makefile 2011-09-11 15:02:18 +03:00
alauda.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
ams-delta.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
atmel_nand.c mtd: atmel_nand: optimize read/write buffer functions 2011-09-11 15:02:15 +03:00
atmel_nand_ecc.h
au1550nd.c mtd: spelling, capitalization, uniformity 2011-09-11 15:02:13 +03:00
autcpu12.c mtd: nand: rename NAND_USE_FLASH_BBT 2011-09-11 15:01:56 +03:00
bcm_umi_bch.c
bcm_umi_nand.c mtd: bcm_umi_nand: clean up error handling code 2011-09-11 15:02:17 +03:00
bf5xx_nand.c mtd: bf5xx_nand: convert to mtd_device_register() 2011-05-25 02:23:15 +01:00
cafe_nand.c mtd: spelling, capitalization, uniformity 2011-09-11 15:02:13 +03:00
cmx270_nand.c mtd: cmx270_nand.c: use mtd_device_parse_register 2011-09-11 15:02:08 +03:00
cs553x_nand.c mtd: cs553x_nand.c: use mtd_device_parse_register 2011-09-11 15:02:08 +03:00
davinci_nand.c mtd: davinci_nand.c: use mtd_device_parse_register 2011-09-11 15:02:08 +03:00
denali.c mtd: denali: detect the number of banks before resetting NAND 2011-09-11 15:02:04 +03:00
denali.h mtd: denali: detect the number of banks 2011-05-25 02:02:12 +01:00
diskonchip.c mtd: spelling, capitalization, uniformity 2011-09-11 15:02:13 +03:00
fsl_elbc_nand.c mtd: eLBC NAND: update ecc_stats.corrected when lteccr available 2011-09-11 15:02:17 +03:00
fsl_upm.c mtd: fsl_upm: fix a memory leak in fun_chip_init error path 2011-09-11 15:02:14 +03:00
fsmc_nand.c mtd: fsmc_nand.c: use mtd_device_parse_register 2011-09-11 15:02:08 +03:00
gpio.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
h1910.c mtd: h1910.c: use mtd_device_parse_register 2011-09-11 15:02:08 +03:00
jz4740_nand.c mtd: jz4740_nand.c: use mtd_device_parse_register 2011-09-11 15:02:08 +03:00
mpc5121_nfc.c mtd: mpc5121_nfc.c: use mtd_device_parse_register 2011-09-11 15:02:12 +03:00
mxc_nand.c mtd: mxc_nand: add mx53 NFC driver support 2011-09-11 15:02:17 +03:00
nand_base.c mtd: support reading OOB without ECC 2011-09-11 15:13:38 +03:00
nand_bbt.c mtd: replace DEBUG() with pr_debug() 2011-09-11 15:02:16 +03:00
nand_bch.c mtd: cleanup style on pr_debug messages 2011-09-11 15:02:16 +03:00
nand_bcm_umi.c
nand_bcm_umi.h
nand_ecc.c mtd: spelling, capitalization, uniformity 2011-09-11 15:02:13 +03:00
nand_ids.c
nandsim.c mtd: nand: rename NAND_USE_FLASH_BBT 2011-09-11 15:01:56 +03:00
ndfc.c mtd: ndfc.c: use mtd_device_parse_register 2011-09-11 15:02:12 +03:00
nomadik_nand.c mtd: nomadik_nand: add missing nand_release in nomadik_nand_remove 2011-09-11 15:01:59 +03:00
nuc900_nand.c mtd: nuc900_nand: add missing nand_release in nuc900_nand_remove 2011-09-11 15:01:58 +03:00
omap2.c mtd: cleanup style on pr_debug messages 2011-09-11 15:02:16 +03:00
orion_nand.c mtd: orion_nand.c: use mtd_device_parse_register 2011-09-11 15:02:09 +03:00
pasemi_nand.c mtd: nand: rename NAND_USE_FLASH_BBT 2011-09-11 15:01:56 +03:00
plat_nand.c mtd: plat_nand.c: use mtd_device_parse_register 2011-09-11 15:02:09 +03:00
ppchameleonevb.c mtd: ppchameleonevb.c: use mtd_device_parse_register 2011-09-11 15:02:09 +03:00
pxa3xx_nand.c mtd: pxa3xx_nand: enable multiple chip select support 2011-09-11 15:02:15 +03:00
r852.c Fix common misspellings 2011-03-31 11:26:23 -03:00
r852.h
rtc_from4.c mtd: replace DEBUG() with pr_debug() 2011-09-11 15:02:16 +03:00
s3c2410.c mtd: s3c2410 nand: Remove uncessary null check 2011-09-11 15:02:17 +03:00
sh_flctl.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
sharpsl.c mtd: sharpsl.c: use mtd_device_parse_register 2011-09-11 15:02:09 +03:00
sm_common.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
sm_common.h
socrates_nand.c mtd: socrates_nand.c: use mtd_device_parse_register 2011-09-11 15:02:13 +03:00
spia.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
tmio_nand.c mtd: tmio_nand.c: use mtd_device_parse_register 2011-09-11 15:02:09 +03:00
txx9ndfmc.c mtd: txx9ndfmc.c: use mtd_device_parse_register 2011-09-11 15:02:09 +03:00