I'm using a Micron MT29F8G08ABABAWP on a board we have, and I'm currently porting our linux from the old PSP version 03.21.00.04 (Linux kernel version 2.6.37) to the newer 03.22.00.02 (Linux kernel version 3.3), with the hopes of eventually moving to the mainline kernel (3.6+). Under the old kernel, I didn't have a problem with the davinci_nand driver recognizing and using the flash, but the new kernel version fails with:
no 4-bit ECC support yet for 4KiB-page NAND
It appears the old PSP had code to handle 4-bit ECC for devices up to (and including) 4K, but the new 3.3 kernel has lost this feature. Is there a reason for this? I can get around it by using 1-bit ECC, but it seems odd to remove features when moving from a 2.6.37 kernel to a 3.3+ kernel.
Snippet from old 2.6.37 kernel:
if (chunks == 8) {
info->ecclayout = hwecc4_4096;
info->chip.ecc.mode = NAND_ECC_HW_OOB_FIRST;
goto syndrome_done;
}
/*
* NAND chips >4K page size are not yet supported.
* TODO: Note that nand_ecclayout has now been expanded and can
* hold plenty of OOB entries.
*/
dev_warn(&pdev->dev, "no 4-bit ECC support yet "
"for >4KiB-page NAND\n");
ret = -EIO;
Snippet from 3.3 kernel:
if (chunks == 4) {
info->ecclayout = hwecc4_2048;
info->chip.ecc.mode = NAND_ECC_HW_OOB_FIRST;
goto syndrome_done;
}
/* 4KiB page chips are not yet supported. The eccpos from
* nand_ecclayout cannot hold 80 bytes and change to eccpos[]
* breaks userspace ioctl interface with mtd-utils. Once we
* resolve this issue, NAND_ECC_HW_OOB_FIRST mode can be used
* for the 4KiB page chips.
*
* TODO: Note that nand_ecclayout has now been expanded and can
* hold plenty of OOB entries.
*/
dev_warn(&pdev->dev, "no 4-bit ECC support yet "
"for 4KiB-page NAND\n");
ret = -EIO;