mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-01-19 00:24:04 +00:00
f44bcb9f0d
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> |
||
---|---|---|
.. | ||
nand | ||
onenand | ||
spi | ||
ubi | ||
ubispl | ||
altera_qspi.c | ||
cfi_flash.c | ||
cfi_mtd.c | ||
hbmc-am654.c | ||
jedec_flash.c | ||
Kconfig | ||
Makefile | ||
mtd-uclass.c | ||
mtd_uboot.c | ||
mtdconcat.c | ||
mtdcore.c | ||
mtdcore.h | ||
mtdpart.c | ||
pic32_flash.c | ||
renesas_rpc_hf.c | ||
stm32_flash.c | ||
stm32_flash.h |