Skip to content

rawnand: pl35x: Implement mixed ECC

Bastien Curutchet linux-mtd lkml stable 1 version In review

Get series with b4
b4 am [email protected] change-id 20260529-mix-ecc-46e8ccd4e9ae

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4nand: hamming: Replace sm_order boolean with enumdrivers/mtd/nand/ecc-sw-hamming.c drivers/mtd/nand/raw/nand_base.c include/linux/mtd/nand-ecc-sw-hamming.h+34 -180 replies
2/4nand: hamming: Add support for the PL35x ECC bit orderingdrivers/mtd/nand/ecc-sw-hamming.c drivers/mtd/nand/raw/nand_base.c include/linux/mtd/nand-ecc-sw-hamming.h +1 more+111 -470 replies
3/4rawnand: base: Export nand_read_page_sweccdrivers/mtd/nand/raw/nand_base.c drivers/mtd/nand/raw/pl35x-nand-controller.c include/linux/mtd/rawnand.h+6 -20 replies
4/4rawnand: pl35x: Implement mixed ECC computingdrivers/mtd/nand/raw/pl35x-nand-controller.c+10 -1620 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] rawnand: pl35x: Implement mixed ECC

Hi all,

This series addresses the PL353 errata "SLC ECC misses single error to bit0 byte0 and fails to detect some double error cases" (see 721059 in [1]).

The ECC HW engine is known to be broken on this chip, it fails to detect some bitflips on reads.

This series implements a mixed-ECC where the HW engine is used on writes and reads are done by software. To make it work, the software ECC has to use the same layout for the ECC bits than the HW engine. Patches 1 & 2 add the PL35x ordering to the available orderings for soft ECC. Patches 3 & 4 make use of this ordering to implement the mixed-ECC for the PL353 controller.

Note that this series is based on top of nand/next.

[1]: https://developer.arm.com/documentation/rlnc000227/a

---
Bastien Curutchet (4):
nand: hamming: Replace sm_order boolean with enum
nand: hamming: Add support for the PL35x ECC bit ordering
rawnand: base: Export nand_read_page_swecc
rawnand: pl35x: Implement mixed ECC computing

 drivers/mtd/nand/ecc-sw-hamming.c            | 179 ++++++++++++++++++---------
 drivers/mtd/nand/raw/nand_base.c             |  11 +-
 drivers/mtd/nand/raw/pl35x-nand-controller.c | 173 ++------------------------
 include/linux/mtd/nand-ecc-sw-hamming.h      |  20 ++-
 include/linux/mtd/rawnand.h                  |   7 +-
 5 files changed, 161 insertions(+), 229 deletions(-)

---
base-commit: f97bdc8ec1dc7b33781a702eeba55326c206be56
change-id: 20260529-mix-ecc-46e8ccd4e9ae

Best regards,

Signature · 1 line
Bastien Curutchet <[email protected]>