This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/OMAP3530: Bad Blocks on OMAP3530 PoP Memory preventing NAND Flashing

Part Number: OMAP3530

Tool/software: Linux


I have been writing to the PoP memory of various OMAP3530 devices for the last year without any issues arising due to bad blocks on the NAND until I received a new set of boards from our manufacturer recently. I use a JFFS2 filesystem. These failures are specific to these new boards, as I have retried the commands on older boards, and they work, and I was wondering if someone could advise me on how to deal with this issue.

After using the "nand bad" command, I realize that this device has about 14 bad blocks, but I also believe it has 4096 blocks in total. I feel that 14 bad blocks should not prevent the NAND flashing in my unless the Error Correction Algorithm is not working properly. I also checked the older version boards that work, and noticed that they have 0 bad blocks.

The console output after I do a "nand erase" in U-boot looks like this:

NAND erase: device 0 whole chip
Skipping bad block at 0x00d20000
Skipping bad block at 0x04ea0000
Skipping bad block at 0x05360000
Skipping bad block at 0x09060000
Skipping bad block at 0x09a40000
Skipping bad block at 0x0d340000
Skipping bad block at 0x11260000
Skipping bad block at 0x15f20000
Skipping bad block at 0x16620000
Skipping bad block at 0x18a60000
Skipping bad block at 0x18aa0000
Skipping bad block at 0x18b00000
Skipping bad block at 0x1d3e0000
Skipping bad block at 0x1fec0000
Erasing at 0x1ffe0000 -- 100% complete. Cleanmarker written at 0x1ffe0000.

The output after using "flash_eraseall -j /dev/mtdX" is :

Erasing 128 Kibyte @ 39c0000 -- 90 % complete. Cleanmarker written at 39a0000.
flash_eraseall: /dev/mtdX: MTD Erase failure: Input/output error
Erasing 128 Kibyte @ 4000000 -- 100 % complete.Cleanmarker written at 3fe0000.

The output after using "mount /dev/mtdblockX /media/mtdX -t jffs2" is:

[ 149.376800] Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[ 149.385131] empty_blocks 0, bad_blocks 0, c->nr_blocks 512
mount: /dev/mtdblockX: can't read superblock

 I also noticed in the boot logs this line "Memory policy: ECC disabled, Data cache writeback". So, I started to wonder if the ECC is not enabled? How do I know if ECC is enabled and working properly. Here is some more information about the device from the console:

NAND read: device 0 offset 0x2a0000, size 0x400000
4194304 bytes read: OK
## Booting kernel from Legacy Image at 80000000 ...
Image Name: Linux-2.6.38+
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2478852 Bytes = 2.4 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK

Starting kernel ...

I am currently confused as to why I cannot write to this PoP memory from SD card, as I have done for other devices? Any help would be greatly appreciated.