
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 01/29/2013 02:54 PM, Scott Wood wrote:
On 01/28/2013 07:35:40 AM, Jordy van Wolferen wrote:
This is tested with a custom AM3359 (rev 2.0) board. NAND chip: MT29F16G08ABABAWP
This code allows me to boot from ROM code. The ROM code forces BCH16 on NAND chips with a 4k page size.
BCH16 is not enabled by default.
Missing Signed-off-by (please read the "Sign your work" section of Documentation/SubmittingPatches in Linux and be sure that you meet the conditions of the Developer's Certificate of Origin before adding your sign off).
Note that this also appears to be versus a TI SDK tree and not mainline (but migrating the code shouldn't be overly difficult now that NAND support is mainline).
Could you explain the patch in a bit more detail? You say it is "not enabled by default" -- what would be required to enable it?
It needs to be auto-detected and switched to, just like how the ROM does (which is to say when the ROM picks up BCH16 and wants it, we do too).
[snip]
diff --git a/include/linux/mtd/mtd-abi.h b/include/linux/mtd/mtd-abi.h index 8bdd231..6979a2a 100644 --- a/include/linux/mtd/mtd-abi.h +++ b/include/linux/mtd/mtd-abi.h @@ -125,7 +125,7 @@ struct nand_oobfree { */ struct nand_ecclayout { uint32_t eccbytes; - uint32_t eccpos[128]; + uint32_t eccpos[208]; uint32_t oobavail; struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES]; };
Changes to generic code should ideally be separate patches.
True. And I wonder if the mtd re-sync covers this or not.
- -- Tom