[PATCH v4 7/9] nand: spi: add Micron spi nand support

Boris Brezillon boris.brezillon at free-electrons.com
Thu Mar 30 05:57:53 PDT 2017


On Thu, 30 Mar 2017 14:31:54 +0200
Arnaud Mouiche <arnaud.mouiche at gmail.com> wrote:

> > +
> > +static struct spinand_ecc_engine_ops generic_spi_ecc_engine_ops = {
> > +	.get_ecc_status = mt29f_get_ecc_status,
> > +};
> > +  
> 
> MT29F1G01AAADD already has a different ecc status mask (only 2 bits) 
> requiring a different get_ecc_status op.

Interesting. It seems that NAND/NOR manufacturers are doing the same
mistakes over and over again :-/. And it tends to confirm that having
per-vendor drivers is actually a good idea if we want to isolate
all these vendor specific handling bits from the core.

> Maybe you should add directly an entry in MICRON_SPI_NAND_INFO(...) 
> macro to specify the ecc_engine_ops.

Yep, sounds reasonable.

> 
> Also, shouldn't this generic_spi_ecc_engine_ops be a "static const struct" ?

Definitely.



More information about the linux-mtd mailing list