u-boot/drivers/mtd
David Rivshin f44bcb9f0d nand: gpmc: Handle bitflips in erased pages when using BCH ECC engine
In the case of an erased (sub)page both the data and ECC are all 0xFF
bytes. This fails the normal ECC verification, as the computed ECC of
all-0xFF is not also 0xFF. The GPMC NAND driver attempted to detect
erased pages by checking that the ECC bytes are all-0xFF, but this had
two problems:
1) bitflips in the data were not corrected, so the data looked not-erased
2) bitflips in the ECC bytes were reported as uncorrectable ECC errors

The equivalent Linux driver [1] correctly handles this by counting the
number of 0-bits in the combination of data and ECC bytes. If the number
of 0-bits is less than the amount of bits correctable by the selected
ECC algorithm, then it is treated as an erased page with correctable
bitflips.

Implement similar, though simplified, logic in omap_correct_data_bch().

[1] see omap_elm_correct_data() in omap2.c

Signed-off-by: David Rivshin <drivshin@allworx.com>
2022-01-16 08:31:03 -05:00
..
nand nand: gpmc: Handle bitflips in erased pages when using BCH ECC engine 2022-01-16 08:31:03 -05:00
onenand mtd: Remove mtd_erase_callback() entirely 2021-10-23 15:47:33 +05:30
spi - disable CONFIG_NET_RANDOM_ETHADDR when unnecessary on amlogic based configs 2022-01-09 07:56:31 -05:00
ubi mtd: Remove mtd_erase_callback() entirely 2021-10-23 15:47:33 +05:30
ubispl drivers/mtd/ubispl/ubispl.c: Fix spelling of "mismatched". 2022-01-13 07:57:49 -05:00
altera_qspi.c mtd: Remove mtd_erase_callback() entirely 2021-10-23 15:47:33 +05:30
cfi_flash.c mtd: cfi: Fix PPB lock status readout 2021-04-28 10:29:36 +02:00
cfi_mtd.c mtd: Remove mtd_erase_callback() entirely 2021-10-23 15:47:33 +05:30
hbmc-am654.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
jedec_flash.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
Kconfig - Disable ATAGS for STM32 MCU and MPU boards 2021-10-12 12:01:00 -04:00
Makefile mtd: remove SPEAr flash driver st_smi 2021-09-24 12:09:47 -04:00
mtd-uclass.c dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
mtd_uboot.c mtd: probe SPI NOR devices in mtd_probe_devices() 2021-06-24 11:54:32 +05:30
mtdconcat.c mtd: Remove mtd_erase_callback() entirely 2021-10-23 15:47:33 +05:30
mtdcore.c mtd: Remove mtd_erase_callback() entirely 2021-10-23 15:47:33 +05:30
mtdcore.h mtd: move definitions to enlarge their range 2018-09-20 20:10:49 +05:30
mtdpart.c mtd: Remove mtd_erase_callback() entirely 2021-10-23 15:47:33 +05:30
pic32_flash.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
renesas_rpc_hf.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
stm32_flash.c common: Drop flash.h from common header 2020-05-18 14:53:28 -04:00
stm32_flash.h stm32: stm32f4: move flash driver to mtd driver location 2016-03-26 18:49:28 -04:00