How is raw NAND flash bad block handled on iMX7D?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How is raw NAND flash bad block handled on iMX7D?

959 Views
bensonyoung
Contributor I

Hello,

On our device platform. We are using raw NAND flash as the sole storage/boot device medium.

I am aware that kobs-ng is used by mfg-tool to scan NAND flash and create a DBBT on the NAND flash.

I am finding the NAND flash driver is a little complex to follow, so I am hoping someone who is more knowledgeable with the NAND controller to help answer a few questions I have.

Does U-boot refer to DBBT during system boot? is the NAND driver on U-Boot 'aware' of BAD blocks when executing command such as "nand write"?

What happens when the driver detects a bad NAND flash block during read/write operation? skip to the next block?

What does the NAND flash driver do when error is returned by NAND flash? What happens if NAND GPMI detects an uncorrectable ECC error? does the controller mark the block in question as "Bad"? or does nothing at all?

thank you for your help

Labels (2)
0 Kudos
Reply
1 Reply

830 Views
b36401
NXP Employee
NXP Employee

You can access NAND with /dev/mmcblkX where "X" is a digit associated to exact NAND chip.
And also you can access NAND via NAND GPMI Flash Driver. It has the callbacks for raw access.
Please refer to chapter 33.2.1 of i.MX Linux Reference Manual.

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply