* [PATCH 0/2] mtd: nand: omap: Fix build with CONFIG_MTD_NAND_OMAP_BCH=m
@ 2014-10-01 11:33 Roger Quadros
2014-10-01 11:33 ` [PATCH v2 1/2] mtd: nand: Force omap_elm to be built as a module if omap2_nand is a module Roger Quadros
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Roger Quadros @ 2014-10-01 11:33 UTC (permalink / raw)
To: linux-arm-kernel
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(-)
--
1.8.3.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] mtd: nand: Force omap_elm to be built as a module if omap2_nand is a module
2014-10-01 11:33 [PATCH 0/2] mtd: nand: omap: Fix build with CONFIG_MTD_NAND_OMAP_BCH=m Roger Quadros
@ 2014-10-01 11:33 ` Roger Quadros
2014-10-01 11:33 ` [PATCH 2/2] mtd: nand: omap: Correct CONFIG_MTD_NAND_OMAP_BCH help message Roger Quadros
2014-10-07 6:44 ` [PATCH 0/2] mtd: nand: omap: Fix build with CONFIG_MTD_NAND_OMAP_BCH=m Brian Norris
2 siblings, 0 replies; 4+ messages in thread
From: Roger Quadros @ 2014-10-01 11:33 UTC (permalink / raw)
To: linux-arm-kernel
From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
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'
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
drivers/mtd/nand/Kconfig | 5 ++++-
drivers/mtd/nand/Makefile | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index f1cf503..1cb4b1b 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -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
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index b3237b7..9c847e4 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -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
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] mtd: nand: omap: Correct CONFIG_MTD_NAND_OMAP_BCH help message
2014-10-01 11:33 [PATCH 0/2] mtd: nand: omap: Fix build with CONFIG_MTD_NAND_OMAP_BCH=m Roger Quadros
2014-10-01 11:33 ` [PATCH v2 1/2] mtd: nand: Force omap_elm to be built as a module if omap2_nand is a module Roger Quadros
@ 2014-10-01 11:33 ` Roger Quadros
2014-10-07 6:44 ` [PATCH 0/2] mtd: nand: omap: Fix build with CONFIG_MTD_NAND_OMAP_BCH=m Brian Norris
2 siblings, 0 replies; 4+ messages in thread
From: Roger Quadros @ 2014-10-01 11:33 UTC (permalink / raw)
To: linux-arm-kernel
The MTD_NAND_OMAP_BCH doesn't harm on legacy OMAP platforms
so don't state that it should be disabled for them.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
drivers/mtd/nand/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 1cb4b1b..dd10646 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -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
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 0/2] mtd: nand: omap: Fix build with CONFIG_MTD_NAND_OMAP_BCH=m
2014-10-01 11:33 [PATCH 0/2] mtd: nand: omap: Fix build with CONFIG_MTD_NAND_OMAP_BCH=m Roger Quadros
2014-10-01 11:33 ` [PATCH v2 1/2] mtd: nand: Force omap_elm to be built as a module if omap2_nand is a module Roger Quadros
2014-10-01 11:33 ` [PATCH 2/2] mtd: nand: omap: Correct CONFIG_MTD_NAND_OMAP_BCH help message Roger Quadros
@ 2014-10-07 6:44 ` Brian Norris
2 siblings, 0 replies; 4+ messages in thread
From: Brian Norris @ 2014-10-07 6:44 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Oct 01, 2014 at 02:33:28PM +0300, Roger Quadros wrote:
> 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.
Thanks for finishing these off properly. Pushed to l2-mtd.git.
Briarn
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-07 6:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-01 11:33 [PATCH 0/2] mtd: nand: omap: Fix build with CONFIG_MTD_NAND_OMAP_BCH=m Roger Quadros
2014-10-01 11:33 ` [PATCH v2 1/2] mtd: nand: Force omap_elm to be built as a module if omap2_nand is a module Roger Quadros
2014-10-01 11:33 ` [PATCH 2/2] mtd: nand: omap: Correct CONFIG_MTD_NAND_OMAP_BCH help message Roger Quadros
2014-10-07 6:44 ` [PATCH 0/2] mtd: nand: omap: Fix build with CONFIG_MTD_NAND_OMAP_BCH=m Brian Norris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).