[PATCH v2 1/2] mtd: rawnand: gpmi: Refactor bch geometry settings function

Miquel Raynal miquel.raynal at bootlin.com
Mon Mar 28 02:17:51 PDT 2022


Hi Han,

han.xu at nxp.com wrote on Fri, 25 Mar 2022 16:14:10 -0500:

> The code change refactor the bch geometry setting function, which still
> use the legacy bch setting as default option, while user may choose to
> use chips required minimum ecc strength by DT flag "fsl,use-minimum-ecc".
> It also improve the gpmi_check_ecc function to check if the selected ecc
> strength is strong enough.

That should be a dedicated patch?

Otherwise looks fine.

> 
> 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 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>
> 

Thanks,
Miquèl



More information about the linux-mtd mailing list