In case we don't use NMBM in favor of using UBI on highler layers we still need to handle bad blocks while reading BL3 image from SPI-NAND flash. Ideally we would be using UBI here as well, e.g. by porting drivers/mtd/ubispl/ from U-Boot sources (under BSD-3-Clause).
For now, apply a generic minimal solution sufficient skipping up to 3 bad blocks while reading which is sufficient for loading BL3 even from a very broken NAND.
In case we don't use NMBM in favor of using UBI on highler layers we still need to handle bad blocks while reading BL3 image from SPI-NAND flash. Ideally we would be using UBI here as well, e.g. by porting drivers/mtd/ubispl/ from U-Boot sources (under BSD-3-Clause).
For now, apply a generic minimal solution sufficient skipping up to 3 bad blocks while reading which is sufficient for loading BL3 even from a very broken NAND.
Signed-off-by: Daniel Golle daniel@makrotopia.org