From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 13 Apr 2015 10:42:02 +0200 Subject: [U-Boot] [PATCH] mxs_nand: Fix ECC strength for NAND flash with OOB size of 256 In-Reply-To: <1428914386.26500.5.camel@embedded.rocks> References: <1428826652-314-1-git-send-email-hs@denx.de> <1428914386.26500.5.camel@embedded.rocks> Message-ID: <201504131042.02552.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday, April 13, 2015 at 10:39:46 AM, J?rg Krause wrote: > Hi Heiko, > > On So, 2015-04-12 at 10:17 +0200, Heiko Schocher wrote: > > On the i.mx6 based aristainetos2 board a Toshiba TH58NYG3S0HBAI4 > > is used, which has 4096 pagesize and 256b oob. The ECC strength > > was not correct detected by U-Boot > > > > Signed-off-by: Heiko Schocher > > --- > > > > drivers/mtd/nand/mxs_nand.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/mtd/nand/mxs_nand.c > > b/drivers/mtd/nand/mxs_nand.c > > index 2d2b938..00bf036 100644 > > --- a/drivers/mtd/nand/mxs_nand.c > > +++ b/drivers/mtd/nand/mxs_nand.c > > @@ -163,6 +163,9 @@ static inline uint32_t > > mxs_nand_get_ecc_strength(uint32_t page_data_size, > > > > if (page_oob_size == 224) > > > > return 16; > > > > + > > + if (page_oob_size == 256) > > + return 18; > > > > } > > > > return 0; > > How about calculation the ECC strength dynamically? Peng Fan from > Freescale send a patch doing this in December 2014 which was already > reviewed by Marek: > https://patchwork.ozlabs.org/patch/422756/ > > It is also necessary to change the calculation in mxsboot... Would be nice if the patch got applied, but I think there were some comments and the patch was never fixed/reposted. If Heiko wants to do it, that'd be nice. Nice domain name btw ;-) Best regards, Marek Vasut