Hi Sir,
When I use no matter 'mtd_debug erase /dev/mtd4 0 0x20000' or 'flash_erase /dev/mtd4 0 0x20000' to erase nand flash, it reports "nand_erase_nand: attempt to erase a bad block at page 0x000xxxxxx" for each of the block in all the region "/dev/mtd4 0 0x20000".
There is no block is erased (all skipped)!
However, under uBoot command line, I can erase the nand blocks beginning from offset position of mtd4 without any problem.
A hint I digged out is when the kernel's mtd module try to read nand oob bytes for a block, the indicated callback function tells that the oob bytes is 0x30,0x30,0x30...
That's why the "nand_erase_nand: attempt to erase a bad block at page 0x000xxxxxx" happened.
Our module is AM3715.
The SDK as below:
https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-1TFCAJw7jR/06.00.00.00/ti-sdk-am37x-evm-06.00.00.00-Linux-x86-Install
Please help correct me if any thing missed.
Many thanks!
Jinhua