[SkyHigh Memory SPI NAND Driver]

Miquel Raynal miquel.raynal at bootlin.com
Wed Jan 24 09:07:16 PST 2024


Hi Mohamed,

moh.sardi at skyhighmemory.com wrote on Tue, 23 Jan 2024 01:01:53 +0000:

> Hello Miquel,
> 
> I have a question for bad block marking and checking on Linux... and ECC.
> 
> Do you know how bad block marking is done?
> 
> 1) Bad Block Marking: Are your writing non FF on the first 2 bytes of the OOB? Do you keep Device ECC ON or OFF?
> 2) Bad block Checking: Do you read the first 2 bytes of the OOB with ECC OFF or do you keep ECC ON?

In the raw NAND world, for legacy reasons these checks and writes are
done with the correction engine enabled. But I believe you are
interested into the SPI-NAND side only, and in this case the ECC is
always disabled:

Marking:
https://elixir.bootlin.com/linux/v6.8-rc1/source/drivers/mtd/nand/spi/core.c#L768
Checking:
https://elixir.bootlin.com/linux/v6.8-rc1/source/drivers/mtd/nand/spi/core.c#L733

Thanks,
Miquèl



More information about the linux-mtd mailing list