From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Tue, 01 Sep 2009 14:19:09 -0500 Subject: [U-Boot] [PATCH 2/2] MTD:NAND: ADD new ECC mode NAND_ECC_HW_OOB_FIRST In-Reply-To: <0554BEF07D437848AF01B9C9B5F0BC5D9217B2F9@dlee01.ent.ti.com> References: <7081825318460577925@unknownmsgid> <4b73d43f0909010822s2e06e942i245135ee036660c0@mail.gmail.com> <4A9D3F64.7050900@freescale.com> <0554BEF07D437848AF01B9C9B5F0BC5D9217B2F9@dlee01.ent.ti.com> Message-ID: <4A9D73AD.6060506@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Paulraj, Sandeep wrote: >> John Rigby wrote: >>> Sorry for the late comments. We have been trying to use this code with >>> the associated davinci 4-bit ecc patches and have some questions > We use this internally and it works. Are you having any issues because we don't see any!! Calm down, just because it works doesn't mean nobody should ask questions about the code. >>> Here you calculate ecc then never use the result? >> Hmm, that looks wrong, both here and in the davinci driver. Are the two >> calls to nand_davinci_4bit_readecc reading different things? Does the >> calculate function have any side effects beyond producing data that is >> never used? > Have you reads the patch description. Maybe that might help a bit > > This patch adds the new mode NAND_ECC_HW_OOB_FIRST in the nand code to > support 4-bit ECC on TI DaVinci devices with large page (up to 2K) NAND > chips. This ECC mode is similar to NAND_ECC_HW, with the exception of > read_page API that first reads the OOB area, reads the data in chunks, > feeds the ECC from OOB area to the ECC hw engine and perform any > correction on the data as per the ECC status reported by the engine. Yes, I've read that. That doesn't explain why calculate_ecc is producing data, *after* everything has been read, that is never consumed by anything (hardware or software) AFAICT. It doesn't explain why the "generic" code is passing NULL to ecc.correct. -Scott