mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-05 11:00:15 +00:00
c907464a0a
The initial layout for such NAND chips was the following:
+----------------------------------------------------------------------------+
| 1024 (data) | 30 (ECC) | 1024 (data) | 30 (ECC) | 32 (free OOB) | 30 (ECC) |
+----------------------------------------------------------------------------+
This layout has a weakness: reading empty pages trigger ECC errors
(this is expected), but the hardware ECC engine tries to correct the
data anyway and creates itself bitflips, hence bitflips are detected
in erased pages while actually there are none in the NAND chip.
Two solutions have been found at the same time. One was to enlarge the
free OOB area to 64 bytes, changing the layout to be:
+----------------------------------------------------------------------------+
| 1024 (data) | 30 (ECC) | 1024 (data) | 30 (ECC) | 64 (free OOB) | 30 (ECC) |
+----------------------------------------------------------------------------+
^^
The very big drawbacks of this solution are:
1/ It prevents booting from NAND.
2/ The current Linux driver (marvell_nand) does not have such problem
because it already re-reads possible empty pages in raw mode before
checking for bitflips. Using different layouts in U-Boot and Linux
would simply not work.
As this driver does support raw reads now and uses it to check for
empty pages, let's forget about this broken hack and return to the
initial layout with only 32 free OOB bytes.
Fixes:
|
||
---|---|---|
.. | ||
am335x_spl_bch.c | ||
arasan_nfc.c | ||
atmel_nand.c | ||
atmel_nand_ecc.h | ||
davinci_nand.c | ||
denali.c | ||
denali.h | ||
denali_dt.c | ||
denali_spl.c | ||
fsl_elbc_nand.c | ||
fsl_elbc_spl.c | ||
fsl_ifc_nand.c | ||
fsl_ifc_spl.c | ||
fsl_upm.c | ||
fsmc_nand.c | ||
kb9202_nand.c | ||
Kconfig | ||
kirkwood_nand.c | ||
kmeter1_nand.c | ||
lpc32xx_nand_mlc.c | ||
lpc32xx_nand_slc.c | ||
Makefile | ||
mxc_nand.c | ||
mxc_nand.h | ||
mxc_nand_spl.c | ||
mxs_nand.c | ||
mxs_nand.h | ||
mxs_nand_dt.c | ||
mxs_nand_spl.c | ||
nand.c | ||
nand_base.c | ||
nand_bbt.c | ||
nand_bch.c | ||
nand_ecc.c | ||
nand_ids.c | ||
nand_plat.c | ||
nand_spl_load.c | ||
nand_spl_loaders.c | ||
nand_spl_simple.c | ||
nand_timings.c | ||
nand_util.c | ||
omap_elm.c | ||
omap_gpmc.c | ||
pxa3xx_nand.c | ||
pxa3xx_nand.h | ||
sunxi_nand.c | ||
sunxi_nand_spl.c | ||
tegra_nand.c | ||
tegra_nand.h | ||
vf610_nfc.c | ||
zynq_nand.c |