# SPDX-License-Identifier: GPL-2.0-only

menu "NAND"

config MTD_NAND_CORE
	tristate

config RTOS_OPTIMIZE_ONT
        bool "config for ONT features"
        depends on MACH_SD511X
        default n
        help
          config for ONT features, if not ONT say N.

config MTD_SPI_NAND_BSP
    bool "Support for SPI NAND controller on Vendor SoCs"
    depends on MTD_RAW_NAND && ARCH_BSP
	default n
    help
      Enables support for the SPI NAND device drivers.

config BSP_NAND_ECC_STATUS_REPORT
	bool "Report the ecc status to MTD for Nand Driver"
	depends on MTD_RAW_NAND && ARCH_BSP
	default n
	help
	  Flash Memory Controller reports the ecc status include ECC error
	  and ECC corrected to MTD to monitor the aging of devices.

config BSP_NAND_FS_MAY_NO_YAFFS2
    bool "Remove the restraintion of 16bit ecc type on yaffs2 to Vendor"
    depends on MFD_BSP_FMC
    default n
    help
      The ecc type: 16bit is limited by the Vendor flash memory controller,
      as the yaffs2 tag of rootfs limits the min size of CTRL len is 28.

source "drivers/mtd/nand/fmc100/Kconfig"
source "drivers/mtd/nand/onenand/Kconfig"
source "drivers/mtd/nand/raw/Kconfig"
source "drivers/mtd/nand/spi/Kconfig"

menu "ECC engine support"

config MTD_NAND_ECC
       bool
       depends on MTD_NAND_CORE

# for ONT config
config MTD_PARTITIONS
	bool "register mtd partitions on ONT"
	depends on MACH_SD511X
	default n
	help
	  register mtd partitions on ONT, if not ONT say N.


config RTOS_ONT_RAW_MTD
	bool "support ONT raw mtd code"
	depends on RTOS_OPTIMIZE_ONT
	default n
	help
	  This option enables speical mtdcore code
	  for ONT product.

config RTOS_MTDPARTS_BUGFIX
	bool "support ONT non-standard mtdparts cmdline"
	depends on RTOS_OPTIMIZE_ONT && MTD_CMDLINE_PARTS
	default n
	help
	  Some ONT products add non-standard "mtdparts=" to cmdline.
	  This option fixes cmdline parsing error.

config RTOS_UBI_REOPEN_READONLY
	bool "support ONT reopening ubi volume using readonly mode"
	depends on RTOS_OPTIMIZE_ONT && MTD_UBI_GLUEBI
	default n
	help
	  Some ONT products want to enhance gluebi_get_device function.
	  This option allows ONT products to retry ubi_open_volume readonly
	  after first failure for debugging.

config MTD_NAND_HINFC301
	tristate "Hisilicon NAND Controller v301 device Support"
	default n
	help
	 Hisilicon NAND Controller v301 device Support

endmenu

endmenu
