On 8/17/24 19:58, Simon Glass wrote: > Hi Mikhail, > > On Wed, 14 Aug 2024 at 04:20, Mikhail Kshevetskiy > <[email protected]> wrote: >> only spinand on_die ecc is supported for a moment >> >> Signed-off-by: Mikhail Kshevetskiy <[email protected]> >> --- >> drivers/mtd/nand/Makefile | 2 +- >> drivers/mtd/nand/core.c | 130 +++++++++++++++- >> drivers/mtd/nand/ecc.c | 249 ++++++++++++++++++++++++++++++ >> drivers/mtd/nand/spi/core.c | 207 ++++++++++++++++++++----- >> drivers/mtd/nand/spi/foresee.c | 2 +- >> drivers/mtd/nand/spi/macronix.c | 7 +- >> drivers/mtd/nand/spi/micron.c | 2 +- >> drivers/mtd/nand/spi/toshiba.c | 10 +- >> drivers/mtd/nand/spi/winbond.c | 10 +- >> include/linux/mtd/nand.h | 261 ++++++++++++++++++++++++++++++-- >> include/linux/mtd/spinand.h | 13 +- >> include/spi-mem.h | 2 + >> 12 files changed, 830 insertions(+), 65 deletions(-) >> create mode 100644 drivers/mtd/nand/ecc.c > Somehow this should use driver model (along with a suitable API) for > the ECC acceleration.
It's just a necessary part of ECC engine. Other engines (not on_die) should be a separate modules. Maybe it could be shrink a bit more (by removing traces of other possible engines types). All what I want is: 1) get a working driver with on_die ECC support (it's actually a necessary part of spinand driver) 2) make the code as close to linux driver as possible 3) add the possibility to add other engines in the future. > Regards, > Simon

