[PATCH v4 1/5] mtd: rawnand: gpmi: Refactor bch geometry settings function

Miquel Raynal miquel.raynal at bootlin.com
Thu Apr 21 00:37:11 PDT 2022


On Tue, 2022-04-12 at 02:52:42 UTC, Han Xu wrote:
> The code change refactor the bch geometry setting function, which
> doesn't change the default behavior, while user may choose to use chips
> required minimum ecc strength by DT flag "fsl,use-minimum-ecc".
> 
> The default way to set bch geometry need to set the data chunk
> size(step_size) larger than oob size to make sure BBM locates in data
> chunk, then set the maximum ecc strength oob can hold. It always use
> unbalanced ECC layout, which ecc0 will cover both meta and data0 chunk.
> But the default bch setting is deprecated for large oobsize NAND
> (oobsize >1KB), so in the patch set, there is a split commit that
> introduces a new way to set bch geometry for large oob size NAND.
> 
> 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 at nxp.com>
> Tested-by: Sean Nyekjaer <sean at geanix.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel



More information about the linux-mtd mailing list