mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
![Miquel Raynal](/assets/img/avatar_default.png)
The NAND ECC core is included in the generic NAND core when it is compiled in. Different software ECC engines drivers will select the NAND ECC core and thus also have a dependency on the NAND core. Using a "depends on" between the two leads to possible cases (not real cases, but created by robots) where one is still unselected because of the "select does not verifies depends on" game: WARNING: unmet direct dependencies detected for MTD_NAND_ECC Depends on [n]: MTD [=m] && MTD_NAND_CORE [=n] Selected by [m]: - MTD_NAND_ECC_SW_HAMMING [=y] && MTD [=m] - MTD_NAND_ECC_SW_BCH [=y] && MTD [=m] Fix this by using a select instead. Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Link: https://lore.kernel.org/linux-mtd/20201113123945.32592-1-miquel.raynal@bootlin.com
51 lines
1.3 KiB
Text
51 lines
1.3 KiB
Text
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
menu "NAND"
|
|
|
|
config MTD_NAND_CORE
|
|
tristate
|
|
|
|
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
|
|
select MTD_NAND_CORE
|
|
|
|
config MTD_NAND_ECC_SW_HAMMING
|
|
bool "Software Hamming ECC engine"
|
|
default y if MTD_RAW_NAND
|
|
select MTD_NAND_ECC
|
|
help
|
|
This enables support for software Hamming error
|
|
correction. This correction can correct up to 1 bit error
|
|
per chunk and detect up to 2 bit errors. While it used to be
|
|
widely used with old parts, newer NAND chips usually require
|
|
more strength correction and in this case BCH or RS will be
|
|
preferred.
|
|
|
|
config MTD_NAND_ECC_SW_HAMMING_SMC
|
|
bool "NAND ECC Smart Media byte order"
|
|
depends on MTD_NAND_ECC_SW_HAMMING
|
|
default n
|
|
help
|
|
Software ECC according to the Smart Media Specification.
|
|
The original Linux implementation had byte 0 and 1 swapped.
|
|
|
|
config MTD_NAND_ECC_SW_BCH
|
|
bool "Software BCH ECC engine"
|
|
select BCH
|
|
select MTD_NAND_ECC
|
|
default n
|
|
help
|
|
This enables support for software BCH error correction. Binary BCH
|
|
codes are more powerful and cpu intensive than traditional Hamming
|
|
ECC codes. They are used with NAND devices requiring more than 1 bit
|
|
of error correction.
|
|
|
|
endmenu
|
|
|
|
endmenu
|