u-boot-2016/drivers/mtd
Abhishek Sahu e2d3adc527 mtd: nand: qcom: reorganize read page error handling
Following are the major issues in current implementation for
checking the read errors

1. For checking the erased CW, NAND_ERASED_CW_DETECT_STATUS
   is being read inside qpic_nand_check_status. The
   qpic_nand_check_status will be called after complete page read
   so reading status register won’t help in getting the register
   value after each CW reads.
2. The mtd layer expects the driver to return non-negative
   integer representing the maximum number of bitflips that were
   corrected on any one ecc region. The mtd layer takes care of
   returning EUCLEAN based on returned number.
3. mtd->ecc_stats is only applicable when ECC engine is
   doing ECC correction. For raw reads, the stats should not be
   incremented.

Now the changes have been done to reorganize the error handling

1. schedule the NAND_ERASED_CW_DETECT_STATUS reading after
   every CW read and check the same if ECC engine generates
   uncorrectable error.
2. For raw read, the ECC engine will never generate the
   uncorrectable error or erased CW so check only
   NAND_FLASH_STATUS.
3. The qpic_nand_read_oob should return the maximum number
   of bitflips that were corrected on any one ecc region so
   introduce the max_bitflips for maintaining the same.
4. The read should return the complete data in case of
   BADMSG so move the BADMSG check in the main read function.

Change-Id: Ibef56294ace00d7cd67b501f623fb1d3aeb2c6ec
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
2017-11-07 03:33:45 -08:00
..
nand mtd: nand: qcom: reorganize read page error handling 2017-11-07 03:33:45 -08:00
onenand mtd, ubi, ubifs: resync with Linux-3.14 2014-08-25 19:25:55 -04:00
spi ipq807x: Add 4byte mode support for Winbond nor flash 2017-10-25 04:25:04 -07:00
ubi ubi: fix data aborts in case of NAND bit flips during block read 2017-09-05 16:52:06 +05:30
altera_qspi.c altera_qspi: allow ctrl-c to abort the erase ops 2015-12-28 09:32:43 +08:00
at45.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cfi_flash.c Move console definitions into a new console.h file 2015-11-19 20:27:50 -07:00
cfi_mtd.c mtd, cfi, ubi: add missing writebufsize initialization 2014-11-19 07:54:04 +01:00
dataflash.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ftsmc020.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ipq_spi_flash.c qca: Moved CONFIG_SF_DEFAULT_SPEED to board specific 2016-07-27 01:59:36 -07:00
jedec_flash.c mtd: Handle 29LV800BT 2014-11-19 08:48:41 +01:00
Kconfig mtd: add altera quadspi driver 2015-11-12 08:26:58 +08:00
Makefile ARM: qca: ipq8074: Added support for NOR+NAND 2016-12-02 15:17:35 +05:30
mtd-uclass.c dm: implement a MTD uclass 2015-11-12 08:26:58 +08:00
mtd_uboot.c mtd: uboot: Add meaningful error message 2015-11-12 13:17:28 -05:00
mtdconcat.c kbuild: force to define __UBOOT__ in all the C sources 2014-09-16 12:23:56 -04:00
mtdcore.c compat: Remove is_power_of_2() definition 2015-11-05 16:46:59 -05:00
mtdcore.h mtd, ubi, ubifs: resync with Linux-3.14 2014-08-25 19:25:55 -04:00
mtdpart.c mtd: Introduce mtd_block_isreserved() 2015-08-25 22:53:57 -05:00
mw_eeprom.c Update i386 code (sc520_cdp) 2008-09-09 11:48:53 +02:00
st_smi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00