mbox series

[v4,0/5] Refactor bch settings and support large oob NAND

Message ID 20220412025246.24269-1-han.xu@nxp.com
Headers show
Series Refactor bch settings and support large oob NAND | expand

Message

Han Xu April 12, 2022, 2:52 a.m. UTC
These series of patches refactor the gpmi bch setting function and
introduce a new way to set bch for large oob(oobsize > 1KB) NAND.

Code changes don't affect the default bch behavior but users may add DT
flag to use NAND chips required minimum ecc strength. More strict ecc
strength check added to make sure ecc strength is strong enough. For
some NAND chips that oobsize larger than 1KB, a new way to set bch was
introduced, which may use a separate ecc for meta. In this case, the
data0_size in BCH_FLASH0LAYOUT0 and datan_size in BCH_FLASH0LAYOUT1 need
to be presented in dedicate variables.

Han Xu (5):
  mtd: rawnand: gpmi: Refactor bch geometry settings function
  mtd: rawnand: gpmi: Add strict ecc strength check
  mtd: rawnand: gpmi: Uninline the gpmi_check_ecc function
  mtd: rawnand: gpmi: Rename the variable ecc_chunk_size
  mtd: rawnand: gpmi: Add large oob bch setting support

 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 296 ++++++++++++++++++---
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h |  12 +-
 2 files changed, 264 insertions(+), 44 deletions(-)