diff mbox series

[v2,23/36] mtd: nand: ecc: Let the software BCH ECC engine be a module

Message ID 20190304222841.13899-24-miquel.raynal@bootlin.com (mailing list archive)
State New, archived
Headers show
Series Introduce the generic ECC engine abstraction | expand

Commit Message

Miquel Raynal March 4, 2019, 10:28 p.m. UTC
There is no reason to prevent the software BCH ECC engine
implementation to be compiled as a module, so change the 'bool' into a

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
 drivers/mtd/nand/ecc/Kconfig        | 6 +++++-
 include/linux/mtd/nand-ecc-sw-bch.h | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
diff mbox series


diff --git a/drivers/mtd/nand/ecc/Kconfig b/drivers/mtd/nand/ecc/Kconfig
index 7be48a7efda0..a9ab9bab252c 100644
--- a/drivers/mtd/nand/ecc/Kconfig
+++ b/drivers/mtd/nand/ecc/Kconfig
@@ -15,7 +15,7 @@  config MTD_NAND_ECC_SW_HAMMING_SMC
 	  The original Linux implementation had byte 0 and 1 swapped.
-	bool "Software BCH ECC engine"
+	tristate "Software BCH ECC engine"
 	select BCH
 	select MTD_NAND_ECC
 	default n
@@ -25,4 +25,8 @@  config MTD_NAND_ECC_SW_BCH
 	  ECC codes. They are used with NAND devices requiring more than 1 bit
 	  of error correction.
+	  If you are booting from NAND and need the BCH engine in order to mount
+	  your filesystem, then do not select =m for this option unless you have
+	  an initramfs.
diff --git a/include/linux/mtd/nand-ecc-sw-bch.h b/include/linux/mtd/nand-ecc-sw-bch.h
index 509723870fc8..e72f781829c8 100644
--- a/include/linux/mtd/nand-ecc-sw-bch.h
+++ b/include/linux/mtd/nand-ecc-sw-bch.h
@@ -33,7 +33,7 @@  struct nand_ecc_sw_bch_conf {
 	unsigned char *eccmask;
 int nand_ecc_sw_bch_calculate(struct nand_device *nand,
 			      const unsigned char *buf, unsigned char *code);