public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: sbabic at denx.de <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 01/14] mtd: gpmi: change the BCH layout setting for large oob NAND
Date: Mon, 11 May 2020 12:16:16 +0200 (CEST)	[thread overview]
Message-ID: <20200511101616.C4F8281584@phobos.denx.de> (raw)
In-Reply-To: <20200504140903.23602-2-peng.fan@nxp.com>

> From: Ye Li <ye.li@nxp.com>
> The code change updated the NAND driver BCH ECC layout algorithm to
> support large oob size NAND chips(oob > 1024 bytes) and proposed a new
> way to set ECC layout.
> Current implementation requires each chunk size larger than oob size so
> the bad block marker (BBM) can be guaranteed located in data chunk. The
> ECC layout always using the unbalanced layout(Ecc for both meta and
> Data0 chunk), but for the NAND chips with oob larger than 1k, the driver
> cannot support because BCH doesn?t support GF 15 for 2K chunk.
> The change keeps the data chunk no larger than 1k and adjust the ECC
> strength or ECC layout to locate the BBM in data chunk. General idea for
> large oob NAND chips is
> 1.Try all ECC strength from the minimum value required by NAND spec to
> the maximum one that works, any ECC makes the BBM locate in data chunk
> can be chosen.
> 2.If none of them works, using separate ECC for meta, which will add one
> extra ecc with the same ECC strength as other data chunks. This extra
> ECC can guarantee BBM located in data chunk, of course, we need to check
> if oob can afford it.
> Previous code has two methods for ECC layout setting, the
> legacy_calc_ecc_layout and calc_ecc_layout_by_info, the difference
> between these two methods is, legacy_calc_ecc_layout set the chunk size
> larger chan oob size and then set the maximum ECC strength that oob can
> afford. While the calc_ecc_layout_by_info set chunk size and ECC
> strength according to NAND spec. It has been proved that the first
> method cannot provide safe ECC strength for some modern NAND chips, so
> in current code,
> 1. Driver read NAND parameters first and then chose the proper ECC
> layout setting method.
> 2. If the oob is large or NAND required data chunk larger than oob size,
> chose calc_ecc_for_large_oob, otherwise use calc_ecc_layout_by_info
> 3. legacy_calc_ecc_layout only used for some NAND chips does not contains
> necessary information. So this is only a backup plan, it is NOT
> recommended to use these NAND chips.
> Signed-off-by: Han Xu <b45815@freescale.com>
> Signed-off-by: Ye Li <ye.li@nxp.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  reply	other threads:[~2020-05-11 10:16 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 14:08 [PATCH 00/14] mtd: nand: i.MX update Peng Fan
2020-05-04 14:08 ` [PATCH 01/14] mtd: gpmi: change the BCH layout setting for large oob NAND Peng Fan
2020-05-11 10:16   ` sbabic at denx.de [this message]
2022-03-14 13:30   ` GPMI NAND Regression on i.MX6S Frieder Schrempf
2022-03-16 14:08     ` Fabio Estevam
2022-03-16 16:34       ` Tim Harvey
2022-03-17  8:06         ` Frieder Schrempf
2022-03-17 12:59           ` Frieder Schrempf
2022-03-17 13:14             ` Sean Nyekjaer
2022-03-17 13:19               ` Frieder Schrempf
2022-03-18  8:47           ` [EXT] " Ye Li
2020-05-04 14:08 ` [PATCH 02/14] mtd: gpmi: provide the option to use legacy bch geometry Peng Fan
2020-05-11 10:17   ` sbabic at denx.de
2020-05-04 14:08 ` [PATCH 03/14] nand: mxs: fix the bitflips for erased page when uncorrectable error Peng Fan
2020-05-11 10:19   ` sbabic at denx.de
2020-05-04 14:08 ` [PATCH 04/14] nand: mxs: correct bitflip for erased NAND page Peng Fan
2020-05-11 10:17   ` sbabic at denx.de
2020-05-04 14:08 ` [PATCH 05/14] mxs_nand: Add support for i.MX8M Peng Fan
2020-05-11 10:17   ` sbabic at denx.de
2020-05-04 14:08 ` [PATCH 06/14] nand: Update SPL MXS NAND mini driver Peng Fan
2020-05-11 10:16   ` sbabic at denx.de
2020-05-04 14:08 ` [PATCH 07/14] mxs_nand: Update compatible string for i.MX6SX Peng Fan
2020-05-11 10:15   ` sbabic at denx.de
2020-05-04 14:08 ` [PATCH 08/14] mtd: nand: mxs_nand: add i.MX6QP compatible string Peng Fan
2020-05-11 10:15   ` sbabic at denx.de
2020-05-04 14:08 ` [PATCH 09/14] mtd: mxs_nand: fix the gf_13/14 definition issue Peng Fan
2020-05-11 10:18   ` sbabic at denx.de
2020-05-04 14:08 ` [PATCH 10/14] nand: mxs_nand: make imx8mm can use hardware BCH and randomizer Peng Fan
2020-05-11 10:15   ` sbabic at denx.de
2020-05-04 14:09 ` [PATCH 11/14] mtd: nand: support GPMI NAND driver for i.MX8 Peng Fan
2020-05-11 10:16   ` sbabic at denx.de
2020-05-04 14:09 ` [PATCH 12/14] MXS_NAND: Add clock support for iMX8 Peng Fan
2020-05-11 10:18   ` sbabic at denx.de
2020-05-04 14:09 ` [PATCH 13/14] mxs_nand: don't check zero count when ECC reading with randomizer Peng Fan
2020-05-11 10:18   ` sbabic at denx.de
2020-05-04 14:09 ` [PATCH 14/14] nand: enable the Randomizer module for i.mx7 and i.mx8 Peng Fan
2020-05-11 10:16   ` sbabic at denx.de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200511101616.C4F8281584@phobos.denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox