Skip to content

RFC mtd: nand: add per partition ECC config

Boris BREZILLON linux-mtd lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest4 patches 5 repliesIn review
  2. v1 RFC1 patch 6 repliesSuperseded

Changes in v2 from the cover letter

- almost everything :-)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mtd: nand: take nand_ecc_ctrl initialization out of nand_scan_taildrivers/mtd/nand/nand_base.c+46 -260 replies
2/4mtd: nand: add support for NAND partitionsdrivers/mtd/nand/Kconfig drivers/mtd/nand/Makefile drivers/mtd/nand/nand_base.c +1 more+602 -1320 replies
2/4mtd: nand: add support for NAND partitionsdrivers/mtd/nand/Kconfig drivers/mtd/nand/Makefile drivers/mtd/nand/nand_base.c +3 more+619 -1420 replies
3/4mtd: nand: add DT NAND partition parserdrivers/mtd/nand/ofnandpart.c include/linux/mtd/nand.h+121 -00 replies
4/4mtd: nand: add NAND partition support to the sunxi driverdrivers/mtd/nand/sunxi_nand.c+66 -30 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [RFC PATCH v2 0/4] mtd: nand: add per partition ECC config

Hello,

This patch series is a proposal to add per partition ECC config.

It defines a new partition type called nand_part which stores a pointer to a nand_ecc_ctrl struct.
This specific nand_ecc_ctrl struct is used in place of the base NAND chip nand_ecc_ctrl struct when accessing NAND chip from nand_part MTD device.

If the partition does not define any ECC config, the NAND chip ECC config is used instead.

This patch series also provides an helper function to parse DT defined NAND partitions (ofnandpart_parse).

If you want to test it you'll have to replace calls to mtd_device_parse_register with ofnandpart_parse within your NAND controller driver and implement a driver specific parser function that will provide the ECC config (see ofnandpart_data struct).

The 4th patch of this series is here as an example on how to move from MTD partitions to NAND partitions.

Best Regards,

Boris

Changes since v1:
- almost everything :-)

Boris BREZILLON (4):
mtd: nand: take nand_ecc_ctrl initialization out of nand_scan_tail
mtd: nand: add support for NAND partitions
mtd: nand: add DT NAND partition parser
mtd: nand: add NAND partition support to the sunxi driver

 drivers/mtd/nand/Kconfig      |    4 +
 drivers/mtd/nand/Makefile     |    2 +
 drivers/mtd/nand/nand_base.c  |  763 ++++++++++++++++++++++++++++++++---------
 drivers/mtd/nand/ofnandpart.c |  104 ++++++
 drivers/mtd/nand/sunxi_nand.c |   69 +++-
 include/linux/mtd/nand.h      |   54 +++
 6 files changed, 835 insertions(+), 161 deletions(-)
 create mode 100644 drivers/mtd/nand/ofnandpart.c
Signature · 1 line
1.7.9.5