From mboxrd@z Thu Jan 1 00:00:00 1970 From: Troy Kisky Date: Sat, 28 Jun 2008 15:11:21 -0700 Subject: [U-Boot-Users] [PATCH RFC] ARM: Davinci: NAND fix for large page ECC and linux compatibility In-Reply-To: <20080628033118.GA27177@mersenne.largestprime.net> References: <20080627141723.GA29627@mersenne.largestprime.net> <48651D80.2010506@freescale.com> <20080628033118.GA27177@mersenne.largestprime.net> Message-ID: <4866B709.7000905@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de >>> +#define CFG_LINUX_COMPATIBLE_ECC >>> + */ >> It seems odd that backwards compatibility requires turning *off* an >> option with "compatible" in the name... I'd invert the sense of the >> ifdef, and have it be something like CFG_BROKEN_ECC_COMPATIBILITY. > > The concern with this is people that use their own custom config > files will need to add this #define when they upgrade. How about > just changing the name to CFG_NEW_NAND_ECC_FORMAT then? I like CFG_NEW_NAND_ECC_FORMAT better as well. > #if defined(CFG_NAND_LARGEPAGE) && !defined(CFG_LINUX_COMPATIBLE_ECC) > /* Comment this #error out only if you really really have to. */ > #error "You are using old ECC code that is broken on large page devices. See doc/README.davinci" > #endif > > This forces the user to make a choice - they'll probably curse while > they're doing it, but they can't plead ignorance when they find > their large page NAND isn't detecting ECC errors. > I like this too. Maybe a #warning for small pages as well. Of course both would also depend on #ifdef CFG_NAND_HW_ECC. >> Perhaps we could use some currently unused OOB byte as a marker >> for new/old ECC layout? > > Could do, but any filesystems which use the OOB bytes might step on > these. It also complicates the code even moreso and creates a lot > more scenarios to test and that could go wrong. > > I really do believe it should be a clean switch from one format to > the other, for both small and large page NAND, with no run-time > backwards compatibility. But that's just my POV. I hope that eventually we can remove the old format, but this patch has my ack. Thanks Bernard Troy