From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Sean Nyekjaer <sean@geanix.com>
Cc: Han Xu <han.xu@nxp.com>,
sbabic@denx.de, frieder.schrempf@kontron.de, festevam@gmail.com,
ye.li@nxp.com, peng.fan@nxp.com, linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: nand: raw: gpmi: fix bch geometry settings issue
Date: Thu, 24 Mar 2022 15:24:09 +0100 [thread overview]
Message-ID: <20220324152409.34ef32cc@xps13> (raw)
In-Reply-To: <20220324114801.xrniakorpzns3wk6@Seans-MBP.hinnerup>
Hi Han,
sean@geanix.com wrote on Thu, 24 Mar 2022 12:48:01 +0100:
> Hi Han,
>
> On Mon, Mar 21, 2022 at 03:20:28PM -0500, Han Xu wrote:
> > The code change fixed the kernel gpmi driver bch geometry settings not
> > aligned with u-boot settings issue. For the backward compatibility, it
> > still keeps the legacy bch setting as default. Users may choose to use
> > chips required minimum ecc strength by DT flag "fsl,use-minimum-ecc".
> > It also proposes a new way to set bch geometry for large oob NAND.
> >
> > - For the legacy bch geometry settings
> > The driver uses legacy bch geometry settings by default, if the NAND
> > chips oob size is less than 1KB. The legacy_set_geometry() sets the data
> > chunk size(step_size) larger than oob size to make sure BBM locates in
> > data chunk, then set the maximum ecc stength oob can hold. It always use
> > unbalanced ECC layout, which ecc0 will cover both meta and data0 chunk.
> >
> > - For the large oob bch geometry settings
> > This type of setting will be used for NAND chips that oob size is
> > larger than 1KB, the general idea is,
> >
> > 1.Try all ECC strength from the minimum value required by NAND chip
> > to the maximum one that works, any ECC makes the BBM locate in
> > data chunk can be eligible.
> >
> > 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, also we
> > need to check if oob can afford it.
> >
> > - For all other cases
> > set the bch geometry by chip required strength and step size, which uses
> > the minimum ecc strength chip required. It can be explicitly enabled by
> > DT flag "fsl,use-minimum-ecc", but need to be en/disabled in both u-boot
> > and kernel at the same time.
> >
> > Signed-off-by: Han Xu <han.xu@nxp.com>
> Tested-by: Sean Nyekjaer <sean@geanix.com>
>
> > ---
>
> [ ... ]
>
> From my side it's looking good. I have tested this in legacy mode and it
> keeps functioning.
>
> Since this introduces 2 changes maybe it would be better to seperate the
> changes into 2 patches?
Yeah I was about to ask for it as well.
And please use "mtd: rawnand: gpmi:" as prefix.
>
> Thanks for finally fixing the Linux vs. U-boot unalignment.
>
> /Sean
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2022-03-24 14:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-21 20:20 [PATCH] mtd: nand: raw: gpmi: fix bch geometry settings issue Han Xu
2022-03-24 11:48 ` Sean Nyekjaer
2022-03-24 14:24 ` Miquel Raynal [this message]
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=20220324152409.34ef32cc@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=festevam@gmail.com \
--cc=frieder.schrempf@kontron.de \
--cc=han.xu@nxp.com \
--cc=linux-mtd@lists.infradead.org \
--cc=peng.fan@nxp.com \
--cc=sbabic@denx.de \
--cc=sean@geanix.com \
--cc=ye.li@nxp.com \
/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;
as well as URLs for NNTP newsgroup(s).