Skip to content

RFC Add Mediatek SPI Nand controller and convert ECC driver

Xiangsheng Hou linux-mediatek linux-mtd 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 RFC Latest5 patches 12 repliesIn review
  2. v3 RFC5 patches 12 repliesSuperseded
  3. v2 RFC4 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC4 patches3 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5mtd: nand: ecc: Move mediatek ECC driverdrivers/mtd/nand/Kconfig drivers/mtd/nand/Makefile drivers/mtd/nand/ecc-mtk.c +4 more+14 -30 replies
2/5mtd: nand: ecc: mtk: Convert to the ECC infrastructuredrivers/mtd/nand/ecc-mtk.c include/linux/mtd/nand-ecc-mtk.h+682 -07 replies
3/5spi: mtk: Add mediatek SPI Nand Flash interface driverdrivers/spi/Kconfig drivers/spi/Makefile drivers/spi/spi-mtk-snfi.c+1129 -03 replies
4/5mtd: spinand: Move set/get OOB databytes to each ECC enginesdrivers/mtd/nand/ecc-sw-bch.c drivers/mtd/nand/ecc-sw-hamming.c drivers/mtd/nand/spi/core.c +3 more+198 -492 replies
5/5arm64: dts: mtk: Add snfi nodearch/arm64/boot/dts/mediatek/mt7622-rfb1.dts arch/arm64/boot/dts/mediatek/mt7622.dtsi+29 -00 replies

Reviews trailers per patch

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

Read the v4 thread

Cover letter [RFC,v4,0/5] Add Mediatek SPI Nand controller and convert ECC driver

The Mediatek SPI Nand controller can support multiple SPI protocols, which can support other SPI device in theory. And the SPI Nand controller can cowork with the HW ECC engine for high performance at the pipelined ecc case.

This RFC v4 series fix coding style and move some ecc related code form snfi driver to the ecc driver based on the RFC v3 comment. And, also try to resolve the read/write OOB issue in AUTO mode, which can also resolve the data format issue with Mediatek ECC engine.

The RFC patch v1 and v2 only try to get nand info and ecc status in spi driver. However, this can be resolved by pipelined ECC design.

The RFC patch v3 realize the HW ECC engine in pipelined case.

Only take mt7622 project for dts node example.

Xiangsheng Hou (5):
mtd: nand: ecc: Move mediatek ECC driver
mtd: nand: ecc: mtk: Convert to the ECC infrastructure
spi: mtk: Add mediatek SPI Nand Flash interface driver
mtd: spinand: Move set/get OOB databytes to each ECC engines
arm64: dts: mtk: Add snfi node

 arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts |   16 +
 arch/arm64/boot/dts/mediatek/mt7622.dtsi     |   13 +
 drivers/mtd/nand/Kconfig                     |    9 +
 drivers/mtd/nand/Makefile                    |    1 +
 drivers/mtd/nand/ecc-mtk.c                   | 1207 ++++++++++++++++++
 drivers/mtd/nand/ecc-sw-bch.c                |   71 +-
 drivers/mtd/nand/ecc-sw-hamming.c            |   71 +-
 drivers/mtd/nand/raw/Kconfig                 |    1 +
 drivers/mtd/nand/raw/Makefile                |    2 +-
 drivers/mtd/nand/raw/mtk_ecc.c               |  593 ---------
 drivers/mtd/nand/raw/mtk_ecc.h               |   47 -
 drivers/mtd/nand/raw/mtk_nand.c              |    2 +-
 drivers/mtd/nand/spi/core.c                  |   93 +-
 drivers/spi/Kconfig                          |   11 +
 drivers/spi/Makefile                         |    1 +
 drivers/spi/spi-mtk-snfi.c                   | 1117 ++++++++++++++++
 include/linux/mtd/nand-ecc-mtk.h             |  115 ++
 include/linux/mtd/nand-ecc-sw-bch.h          |    4 +
 include/linux/mtd/nand-ecc-sw-hamming.h      |    4 +
 include/linux/mtd/spinand.h                  |    4 +
 20 files changed, 2691 insertions(+), 691 deletions(-)
 create mode 100644 drivers/mtd/nand/ecc-mtk.c
 delete mode 100644 drivers/mtd/nand/raw/mtk_ecc.c
 delete mode 100644 drivers/mtd/nand/raw/mtk_ecc.h
 create mode 100644 drivers/spi/spi-mtk-snfi.c
 create mode 100644 include/linux/mtd/nand-ecc-mtk.h
Signature · 7 lines
2.25.1


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek