162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ci 362306a36Sopenharmony_cimenu "NAND" 462306a36Sopenharmony_ci 562306a36Sopenharmony_ciconfig MTD_NAND_CORE 662306a36Sopenharmony_ci tristate 762306a36Sopenharmony_ci 862306a36Sopenharmony_cisource "drivers/mtd/nand/onenand/Kconfig" 962306a36Sopenharmony_cisource "drivers/mtd/nand/raw/Kconfig" 1062306a36Sopenharmony_cisource "drivers/mtd/nand/spi/Kconfig" 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_cimenu "ECC engine support" 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ciconfig MTD_NAND_ECC 1562306a36Sopenharmony_ci bool 1662306a36Sopenharmony_ci select MTD_NAND_CORE 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ciconfig MTD_NAND_ECC_SW_HAMMING 1962306a36Sopenharmony_ci bool "Software Hamming ECC engine" 2062306a36Sopenharmony_ci default y if MTD_RAW_NAND 2162306a36Sopenharmony_ci select MTD_NAND_ECC 2262306a36Sopenharmony_ci help 2362306a36Sopenharmony_ci This enables support for software Hamming error 2462306a36Sopenharmony_ci correction. This correction can correct up to 1 bit error 2562306a36Sopenharmony_ci per chunk and detect up to 2 bit errors. While it used to be 2662306a36Sopenharmony_ci widely used with old parts, newer NAND chips usually require 2762306a36Sopenharmony_ci more strength correction and in this case BCH or RS will be 2862306a36Sopenharmony_ci preferred. 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ciconfig MTD_NAND_ECC_SW_HAMMING_SMC 3162306a36Sopenharmony_ci bool "NAND ECC Smart Media byte order" 3262306a36Sopenharmony_ci depends on MTD_NAND_ECC_SW_HAMMING 3362306a36Sopenharmony_ci default n 3462306a36Sopenharmony_ci help 3562306a36Sopenharmony_ci Software ECC according to the Smart Media Specification. 3662306a36Sopenharmony_ci The original Linux implementation had byte 0 and 1 swapped. 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ciconfig MTD_NAND_ECC_SW_BCH 3962306a36Sopenharmony_ci bool "Software BCH ECC engine" 4062306a36Sopenharmony_ci select BCH 4162306a36Sopenharmony_ci select MTD_NAND_ECC 4262306a36Sopenharmony_ci default n 4362306a36Sopenharmony_ci help 4462306a36Sopenharmony_ci This enables support for software BCH error correction. Binary BCH 4562306a36Sopenharmony_ci codes are more powerful and cpu intensive than traditional Hamming 4662306a36Sopenharmony_ci ECC codes. They are used with NAND devices requiring more than 1 bit 4762306a36Sopenharmony_ci of error correction. 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ciconfig MTD_NAND_ECC_MXIC 5062306a36Sopenharmony_ci bool "Macronix external hardware ECC engine" 5162306a36Sopenharmony_ci depends on HAS_IOMEM 5262306a36Sopenharmony_ci select MTD_NAND_ECC 5362306a36Sopenharmony_ci help 5462306a36Sopenharmony_ci This enables support for the hardware ECC engine from Macronix. 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ciconfig MTD_NAND_ECC_MEDIATEK 5762306a36Sopenharmony_ci tristate "Mediatek hardware ECC engine" 5862306a36Sopenharmony_ci depends on HAS_IOMEM 5962306a36Sopenharmony_ci depends on ARCH_MEDIATEK || COMPILE_TEST 6062306a36Sopenharmony_ci select MTD_NAND_ECC 6162306a36Sopenharmony_ci help 6262306a36Sopenharmony_ci This enables support for the hardware ECC engine from Mediatek. 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ciendmenu 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ciendmenu 67