mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
66d7a40beb
The MediaTek Hardware ECC Engine is only present on MediaTek MT27xx and
MT76xx SoCs. The driver for this engine is a dependency for the
MediaTek NAND controller (MTD_NAND_MTK) and the MediaTek SPI NAND Flash
Interface (SPI_MTK_SNFI) drivers, both of which already depend on
ARCH_MEDIATEK.
Hence add a dependency on ARCH_MEDIATEK to the Hardware ECC Engine
driver, too, to prevent asking the user about this driver when
configuring a kernel without MediaTek SoC support.
Fixes: 4fd62f15af
("mtd: nand: make mtk_ecc.c a separated module")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/bb9568e825d4bc7506870b03836baa91bcc4b725.1652104136.git.geert+renesas@glider.be
67 lines
1.7 KiB
Plaintext
67 lines
1.7 KiB
Plaintext
# 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.
|
|
|
|
config MTD_NAND_ECC_MXIC
|
|
bool "Macronix external hardware ECC engine"
|
|
depends on HAS_IOMEM
|
|
select MTD_NAND_ECC
|
|
help
|
|
This enables support for the hardware ECC engine from Macronix.
|
|
|
|
config MTD_NAND_ECC_MEDIATEK
|
|
tristate "Mediatek hardware ECC engine"
|
|
depends on HAS_IOMEM
|
|
depends on ARCH_MEDIATEK || COMPILE_TEST
|
|
select MTD_NAND_ECC
|
|
help
|
|
This enables support for the hardware ECC engine from Mediatek.
|
|
|
|
endmenu
|
|
|
|
endmenu
|