alistair23-linux/drivers/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
..
chips mtd: cfi_cmdset_0002: Slight cleanup of fixup messages 2012-05-13 23:34:36 -05:00
devices mtd: m25p80: Add support for n25q064 2012-07-06 18:17:07 +01:00
lpddr mtd: lpddr: replace open-coded ARRAY_SIZE with macro 2012-05-13 22:47:31 -05:00
maps - More robust parsing especially of xattr data in JFFS2 2012-06-01 16:55:42 -07:00
nand mtd: nand: teach write_page and write_page_raw return an error code 2012-07-06 18:17:07 +01:00
onenand mtd: driver _read() returns max_bitflips; mtd_read() returns -EUCLEAN 2012-05-13 23:14:23 -05:00
tests mtd: tests: use random32 instead of home-brewed generator 2012-07-06 18:17:04 +01:00
ubi UBI: correct ubi_wl_flush locking 2012-06-07 15:22:21 +03:00
afs.c
ar7part.c
bcm63xxpart.c mtd: bcm63xxpart: handle Broadcom partition order 2012-05-13 22:55:03 -05:00
cmdlinepart.c mtd: cmdlinepart: fix commentary 2012-05-13 23:03:36 -05:00
ftl.c
inftlcore.c mtd: add leading underscore to all mtd functions 2012-03-27 00:20:01 +01:00
inftlmount.c
Kconfig mtd: of_parts: fix breakage in Kconfig 2012-06-01 20:06:59 +01:00
Makefile
mtd_blkdevs.c mtd: mtdblock: call mtd_sync() only if opened for write 2012-03-27 00:11:11 +01:00
mtdblock.c mtd: mtdblock: call mtd_sync() only if opened for write 2012-03-27 00:11:11 +01:00
mtdblock_ro.c
mtdchar.c mtd: fix oops in dataflash driver 2012-05-07 20:29:50 +01:00
mtdconcat.c mtd: unify initialization of erase_info->fail_addr 2012-03-27 01:02:24 +01:00
mtdcore.c mtd: move mtd_read_oob() definition out of mtd.h 2012-07-06 18:16:24 +01:00
mtdcore.h
mtdoops.c mtd: mtdoops: refactor loop 2012-07-06 18:17:02 +01:00
mtdpart.c mtd: driver _read() returns max_bitflips; mtd_read() returns -EUCLEAN 2012-05-13 23:14:23 -05:00
mtdsuper.c
mtdswap.c
nftlcore.c mtd: nftlcore: remove out-of-date and now irrelevant piece of code 2012-03-27 00:24:03 +01:00
nftlmount.c
ofpart.c
redboot.c mtd: redboot: remove useless code 2012-03-27 00:24:14 +01:00
rfd_ftl.c
sm_ftl.c mtd: sm_ftl: fix typo in major number. 2012-03-27 01:01:26 +01:00
sm_ftl.h
ssfdc.c