Part Number: AM3358
Tool/software: Linux
I am in the process of migrating form 3.2.0 to 4.9.x. I am attempting to being up the NAND device via GPMC. I've worked through a few issues in the device tree specification and now the NAND chip is propelry detected and I do not see ECC errors. However when the MTD/UBI layer scan's for UBI volumes the mtd_block_isbad() function, which calls the nand_block_isbad() function is reproting errors which I think are not accurate.
Ive added some tracing:
[ 1.931824] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xaa
[ 1.938276] nand: Micron MT29F2G08ABBEAH4
[ 1.942304] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 1.949953] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
[ 1.955313] XXXADS mtd->_block_isbad = nand_block_isbad
[ 1.960584] 1 ofpart partitions found on MTD device omap2-nand.0
[ 1.966627] Creating 1 MTD partitions on "omap2-nand.0":
[ 1.971970] 0x000000000000-0x000010000000 : "NAND Partition"
[ 1.977671] XXXADS: mtd_block_isbad(): ofs=0 mtd->size=268435456, _block_isbad=c055d9a8
[ 1.985718] XXXADS nand_block_isbad()
[ 1.989391] XXXADS nand_block_checkbad()
[ 1.993326] XXXADS: nand_block_bad() bbt_options=0x00008000 chip->badblockbits=8
[ 2.000784] XXXADS nand_block_bad: path B
[ 2.004820] XXXADS nand_block_bad: 0xff
[ 2.008669] XXXADS nand_block_bad: ofs=2048, page=1, i=1, res=0
[ 2.014612] XXXADS nand_block_bad: path B
[ 2.018642] XXXADS nand_block_bad: 0x30
[ 2.022491] XXXADS nand_block_bad: ofs=4096, page=2, i=2, res=1
[ 2.028440] XXXADS nand_block_bad: res=1
Here bbt_options is set to 0x8000 which means that NAND_BBT_SCAN2NDPAGE is set. I am not an expert on the NAND/MTD/UBI subsystem and I am not sure if this
is detected at runtime or set via the device tree. When I boot the same NAND device using 3.2.x the UBI volules are detected and most bocks aren't marked as bad. With
4.9.x in the current configuration I think just about every block is looking bad.
Any guidance appreciated.
Regards,
Adam