Hi all.
I'm trying to run Linux with JFFS2 root fs on custom board based on AM3874. The board has Macronix MX30LF1208AA 512M-bit NAND Flash Memory.
NAND is working fine under u-boot.
I prepared JFFS2 rootfs image according to processors.wiki.ti.com/.../AM335x_JFFS2_Support_Guide
According to boot logs kernel detects NAND device, but when it tries to mount file system it reports errors
mtd->read(0x800 bytes from 0x1f800) returned ECC error
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x854a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x2be0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0xe600 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x017d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x0200 instead
After digging in driver's code I discovered that during read operation one redundant byte is transferred in a read buffer before real data.
Roorfs partition starts with 85 19 01 e0, but read buffer is filled with 4a 85 19 01 (or ff 85 19 01).
I understand that this is probably related to some mistake in NAND configuration, but just can't find what is wrong.
I hope somebody can help me with this.