kernel-ark/include/linux/mtd
Josh Wu fdbad98dff mtd: nand: teach write_page and write_page_raw return an error code
There is an implemention of hardware ECC write page function which may return an
error indication.
For instance, using Atmel HW PMECC to write one page into a nand flash, the hardware
engine will compute the BCH ecc code for this page. so we need read a the
status register to theck whether the ecc code is generated.
But we cannot assume the status register always can be ready, for example,
incorrect hardware configuration or hardware issue, in such case we need
write_page() to return a error code.

Since the definition of 'write_page' function in struct nand_ecc_ctrl is 'void'.
So this patch will:
  1. add return 'int' value for 'write_page' function.
  2. to be consitent, add return 'int' value for 'write_page_raw' fuctions too.
  3. add code to test the return value, and if negative, indicate an
  error happend when write page with ECC.
  4. fix the compile warning in all impacted nand flash driver.

Note: I couldn't compile-test all of these easily, as some had ARCH dependencies.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:07 +01:00
..
bbm.h mtd: nand: remove NAND_BBT_SEARCH option 2012-07-06 18:17:04 +01:00
blktrans.h
cfi_endian.h
cfi.h
concat.h
doc2000.h
flashchip.h
fsmc.h mtd: Add device-tree support to fsmc_nand 2012-03-27 01:01:07 +01:00
ftl.h
gen_probe.h
gpmi-nand.h mtd: gpmi: add device tree support to gpmi-nand 2012-05-13 23:22:19 -05:00
inftl.h
latch-addr-flash.h
map.h Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
mtd.h mtd: move mtd_read_oob() definition out of mtd.h 2012-07-06 18:16:24 +01:00
mtdram.h
nand_bch.h
nand_ecc.h
nand-gpio.h
nand.h mtd: nand: teach write_page and write_page_raw return an error code 2012-07-06 18:17:07 +01:00
ndfc.h
nftl.h
onenand_regs.h
onenand.h
partitions.h
pfow.h
physmap.h
pismo.h
plat-ram.h
qinfo.h
sh_flctl.h mtd: sh_flctl: Restructure the hardware ECC handling 2012-07-06 18:17:04 +01:00
sharpsl.h
spear_smi.h mtd: add device-tree support to spear_smi 2012-03-27 01:01:21 +01:00
super.h
ubi.h UBI: modify ubi_wl_flush function to clear work queue for a lnum 2012-05-21 11:34:41 +03:00
xip.h