aboutsummaryrefslogtreecommitdiff
path: root/cmd/ubi.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2018-10-11 17:45:44 +0200
committerJagan Teki <jagan@amarulasolutions.com>2018-11-22 11:38:13 +0530
commitc907464a0ad5f1327a3873e9d0ffd617a0182a44 (patch)
tree37c71e8f2a9780fa06276cdb166a1c87b7a0cf96 /cmd/ubi.c
parentaf61ea27f51fce62188276d7b5682ac51b03a705 (diff)
downloadu-boot-c907464a0ad5f1327a3873e9d0ffd617a0182a44.zip
u-boot-c907464a0ad5f1327a3873e9d0ffd617a0182a44.tar.gz
u-boot-c907464a0ad5f1327a3873e9d0ffd617a0182a44.tar.bz2
mtd: rawnand: pxa3xx: fix 2kiB pages with 8b strength chips layout
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: ac56a3b30c ("mtd: nand: pxa3xx: add support for 2KB 8-bit flash") Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com>
Diffstat (limited to 'cmd/ubi.c')
0 files changed, 0 insertions, 0 deletions