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

Mikhail Kshevetskiy mikhail.kshevetskiy at genexis.eu
Sat Aug 17 21:25:31 CEST 2024


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.


> Regards,
> Simon


More information about the U-Boot mailing list