[SkyHigh Memory SPI NAND Driver]

Mohamed Sardi moh.sardi at skyhighmemory.com
Thu Jan 25 14:26:41 PST 2024


Hello Miquel,
Thank you for your response. 

Our understanding is aligned with your comment.


Thanks
Mohamed 

On 1/24/24, 1:07 PM, "Miquel Raynal" <miquel.raynal at bootlin.com <mailto:miquel.raynal at bootlin.com>> wrote:


Hi Mohamed,


moh.sardi at skyhighmemory.com <mailto: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 <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 <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