From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 29 Jan 2013 15:01:50 -0500 Subject: [U-Boot] [PATCH] am335x: NAND: add BCH16 and 4k page size support In-Reply-To: <1359489274.32453.9@snotra> References: <1359489274.32453.9@snotra> Message-ID: <51082AAE.9060105@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de -----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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJRCCquAAoJENk4IS6UOR1WcP4P+wUmTIMJlxEVP0JQseXL3fG1 gS0+KRYzFgceBkunfbgXcCGAqP2z3gcmyNEn0s/8dVkrN1F9MirUNz2VApqQwn0b lj8E/30e042EzM3sM/HyPO0S4yWBVf8GjYiRJMDb80gKOJelthrKNAjermIxqax6 dIHlSvV9pk6DYHTAmcgC7H3QLyHkwyZfSwii+ZRKm5hRPgpiQA2kI7klV8rEH8m7 x5d5c1Ry59hIrefmWWpJvrXhy9u8ipCzk37CCafyl3KbZJoOhZSHiXx73TebI1gP Sg1ONCvi8MkOZrMmC+iXqbKtrPYUGYApd7TonIoJg2yTlkIBevbTY4OLS/p81Btq HoJZ7PziCbeu4jZCVlS4Pz7OiIf5GyBbW1oJP/Uhz4tJAuSLJTrxHaiz7sUIZt3p zNr1ZrL7d5h6hlv3XBuERxRvAn2E4K+sSUJsS+C+8zi/rYMWfWxm5ncB4ygGqCNn QYvJSwWXK/yyFpq0NSbXZnHvBInwGcdrcQVJy3RftATxEW7B2EJKbLx8yJxcpoaU nDyN/NDYEeqZx3Vwf8q2YAv7S72vFP6Lwfy+bAbOeyc3emH6sYTE9iDt2EzTYuMM 3nDjgWZiNGDzJ7WzUv6ptDUIV9UQXxdwa7Ay4qc7aKbSx4t/LhjtIDXJYVh9Bbxq 3cYj8flqqYG9yQQn5xk/ =fOZt -----END PGP SIGNATURE-----