mtd: nand: omap: Fix build with CONFIG_MTD_NAND_OMAP_BCH=m
Subsystems (2)
cover mtd: nand: omap: Fix build with CONFIG_MTD_NAND_OMAP_BCH=m
Hi,
Patch 1 fixes build with OMAP nand driver as built-in and the BCH driver as a module. Ezequiel, I took the liberty to address an issue with your original patch so this is v2.
Patch 2 fixes the help message for CONFIG_MTD_NAND_OMAP_BCH to avoid user confusion. CONFIG_MTD_NAND_OMAP_BCH is optional but doesn't harm on legacy OMAP platforms not having the ELM/BCH hardware.
--
cheers,
-roger
Ezequiel Garcia (1):
mtd: nand: Force omap_elm to be built as a module if omap2_nand is a
module
Roger Quadros (1):
mtd: nand: omap: Correct CONFIG_MTD_NAND_OMAP_BCH help message
drivers/mtd/nand/Kconfig | 7 +++++-- drivers/mtd/nand/Makefile | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-)
Signature · 1 line
1.8.3.2
PATCH v2 1/2 mtd: nand: Force omap_elm to be built as a module if omap2_nand is a module
From: Ezequiel Garcia <[email protected]>
This commit adds a hidden option to build the omap_elm as a module, if omap2_nand is a module (and similarly in the built-in case).
This fixes the following build error when omap2_nand is chosen built-in, and omap_elm is chosen as a module:
drivers/built-in.o: In function `omap_nand_probe':drivers/mtd/nand/omap2.c:2010: undefined reference to elm_config' drivers/mtd/nand/omap2.c:1980: undefined reference to elm_config' drivers/mtd/nand/omap2.c:1927: undefined reference to elm_config' drivers/built-in.o: In function omap_elm_correct_data':drivers/mtd/nand/omap2.c:1444: undefined reference to `elm_decode_bch_error_page'
--- drivers/mtd/nand/Kconfig | 5 ++++- drivers/mtd/nand/Makefile | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/mtd/nand/Kconfig +4 -1
@@ -96,7 +96,7 @@ config MTD_NAND_OMAP2 config MTD_NAND_OMAP_BCH depends on MTD_NAND_OMAP2 - tristate "Support hardware based BCH error correction" + bool "Support hardware based BCH error correction" default n select BCH help
@@ -106,6 +106,9 @@ config MTD_NAND_OMAP_BCH legacy OMAP families like OMAP2xxx, OMAP3xxx do not have ELM engine so they should not enable this config symbol. +config MTD_NAND_OMAP_BCH_BUILD + def_tristate MTD_NAND_OMAP2 && MTD_NAND_OMAP_BCH + config MTD_NAND_IDS tristate
drivers/mtd/nand/Makefile +1 -1
@@ -27,7 +27,7 @@ obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o obj-$(CONFIG_MTD_NAND_ATMEL) += atmel_nand.o obj-$(CONFIG_MTD_NAND_GPIO) += gpio.o obj-$(CONFIG_MTD_NAND_OMAP2) += omap2.o -obj-$(CONFIG_MTD_NAND_OMAP_BCH) += omap_elm.o +obj-$(CONFIG_MTD_NAND_OMAP_BCH_BUILD) += omap_elm.o obj-$(CONFIG_MTD_NAND_CM_X270) += cmx270_nand.o obj-$(CONFIG_MTD_NAND_PXA3xx) += pxa3xx_nand.o obj-$(CONFIG_MTD_NAND_TMIO) += tmio_nand.o
Signature · 1 line
1.8.3.2
PATCH 2/2 mtd: nand: omap: Correct CONFIG_MTD_NAND_OMAP_BCH help message
In reply to Roger QuadrosThe MTD_NAND_OMAP_BCH doesn't harm on legacy OMAP platforms so don't state that it should be disabled for them.
--- drivers/mtd/nand/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/Kconfig +1 -1
@@ -104,7 +104,7 @@ config MTD_NAND_OMAP_BCH locate and correct errors when using BCH ECC scheme. This offloads the cpu from doing ECC error searching and correction. However some legacy OMAP families like OMAP2xxx, OMAP3xxx do not have ELM engine - so they should not enable this config symbol. + so this is optional for them. config MTD_NAND_OMAP_BCH_BUILD def_tristate MTD_NAND_OMAP2 && MTD_NAND_OMAP_BCH
Signature · 1 line
1.8.3.2
cover mtd: nand: omap: Fix build with CONFIG_MTD_NAND_OMAP_BCH=m
In reply to Roger QuadrosQuoted 8 lines · Roger Quadros
Hi,
Patch 1 fixes build with OMAP nand driver as built-in and the BCH driver as a module. Ezequiel, I took the liberty to address an issue with your original patch so this is v2.
Patch 2 fixes the help message for
CONFIG_MTD_NAND_OMAP_BCHto avoid user confusion.CONFIG_MTD_NAND_OMAP_BCHis optional but doesn't harm on legacy OMAP platforms not having the ELM/BCH hardware.
Thanks for finishing these off properly. Pushed to l2-mtd.git.
Briarn