]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
mtd: nand: kirkwood: add RS-ECC encoding support
authorLothar Waßmann <LW@KARO-electronics.de>
Fri, 28 Jul 2017 10:51:14 +0000 (12:51 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 28 Jul 2017 10:51:14 +0000 (12:51 +0200)
commit6bddff903bb875c02831cc312a66f99195a2cdf2
treed35a612e2ccb372781a37bd61cc63e3fbe18caae
parentd62b5d5f4316be8e0e9c8eff84a9c64fedca963f
mtd: nand: kirkwood: add RS-ECC encoding support

The ROM code of the Kirkwood processors uses a
for large page NAND devices.

Currently all data in NAND is protected with 1-bit Hamming ECC
protection. This is incompatible with the default behaviour of the ROM
code for large page NAND devices, which expects a Reed-Solomon ECC
scheme. Booting accidentally works, since the ROM code tries to read
the NAND without ECC after several tries with ECC.
But in case of a single bit error in the first page in NAND, booting
fails, since the boot image header cannot be read by the CPU.

Add support for writing to flash using the RS-ECC scheme found in the
openocd source code supplied by Marvell.
drivers/mtd/nand/Makefile
drivers/mtd/nand/kirkwood_nand.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_ecc_rs.c [new file with mode: 0644]
include/configs/tk71.h
include/linux/mtd/nand.h
include/linux/mtd/nand_ecc.h