[RESEND PATCH v4 10/10] mtd: nand: add initial ecc engine support

Miquel Raynal miquel.raynal at bootlin.com
Wed Aug 21 17:57:19 CEST 2024


Hi Simon,

mikhail.kshevetskiy at genexis.eu wrote on Sat, 17 Aug 2024 23:25:31 +0400:

> On 8/17/24 19:58, Simon Glass wrote:
> > Hi Mikhail,
> >
> > On Wed, 14 Aug 2024 at 04:20, Mikhail Kshevetskiy
> > <mikhail.kshevetskiy at iopsys.eu> wrote:  
> >> only spinand on_die ecc is supported for a moment
> >>
> >> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy at iopsys.eu>
> >> ---
> >>  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.

I would like to question the need to go through the DM API here.
Especially for the on-die situation. Simon, is there a particular area
which bothered you?

Thanks,
Miquèl


More information about the U-Boot mailing list