From patchwork Thu Sep 11 13:47:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 4887221 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0DBC5C0338 for ; Thu, 11 Sep 2014 13:48:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9B2120251 for ; Thu, 11 Sep 2014 13:48:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 65A7B2024F for ; Thu, 11 Sep 2014 13:48:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753810AbaIKNsv (ORCPT ); Thu, 11 Sep 2014 09:48:51 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:45915 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbaIKNsv (ORCPT ); Thu, 11 Sep 2014 09:48:51 -0400 Received: by mail-qa0-f53.google.com with SMTP id n8so1872382qaq.26 for ; Thu, 11 Sep 2014 06:48:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Llh3srPBubdpwEenNW4vae7ssT2rDnujICiE3k73tWw=; b=B0KEDqfiTOo2+Ag1cHws4NpD5QUxYwMI6eeLChQk3qeztR/YgvwLC1RBT/Ct5ms3Ev ztDJJ8RqOwb0lWWz3Na3pqQynGSGbdfpN+CHsR+yY8VqzzkvxlDnh76gwhZvGj7fA9oZ cxjfzwN3mCBGMb70oePscKuVQx1qWq2z0gkD0WND8YYoVxIQMmsQv+ubdbAa42FO6qxB vKDwae6y+MZamaFifmgwdtbUevrqabWfPOLGHgVeDc6lxLYoMtNJRzizMXpYrjLcFAFP YFqQnJtzcvC5Jo344xqggD6UtORFYGuJWYxm5febrvLDhcRr+bATJXb/vXhUHY3Zxgv0 WSmw== X-Gm-Message-State: ALoCoQmzmPBvzP01hkf/7cCCkjrEEKGBcJyzkykYFs/5r4ovUfKqvMC+wr5NUmS8FgI9LTg/wXxD X-Received: by 10.140.96.200 with SMTP id k66mr1721397qge.78.1410443330552; Thu, 11 Sep 2014 06:48:50 -0700 (PDT) Received: from localhost.localdomain (host195.181-8-55.telecom.net.ar. [181.8.55.195]) by mx.google.com with ESMTPSA id 107sm647449qgi.19.2014.09.11.06.48.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Sep 2014 06:48:50 -0700 (PDT) From: Ezequiel Garcia To: Roger Quadros , Brian Norris Cc: Tony Lindgren , , , Ezequiel Garcia Subject: [PATCH 3/3] mtd: nand: Force omap_elm to be built as a module if omap2_nand is a module Date: Thu, 11 Sep 2014 10:47:04 -0300 Message-Id: <1410443224-18477-4-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1410443224-18477-1-git-send-email-ezequiel@vanguardiasur.com.ar> References: <1410443224-18477-1-git-send-email-ezequiel@vanguardiasur.com.ar> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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': /work/linux-2.6/drivers/mtd/nand/omap2.c:2010: undefined reference to `elm_config' /work/linux-2.6/drivers/mtd/nand/omap2.c:1980: undefined reference to `elm_config' /work/linux-2.6/drivers/mtd/nand/omap2.c:1927: undefined reference to `elm_config' drivers/built-in.o: In function `omap_elm_correct_data': /work/linux-2.6/drivers/mtd/nand/omap2.c:1444: undefined reference to `elm_decode_bch_error_page' Signed-off-by: Ezequiel Garcia --- drivers/mtd/nand/Kconfig | 8 +++++++- drivers/mtd/nand/Makefile | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index f1cf503..12e8ee8 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,12 @@ 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 + tristate + depends on MTD_NAND_OMAP2 + default m if MTD_NAND_OMAP2=m && MTD_NAND_OMAP_BCH + default y if MTD_NAND_OMAP2=y && MTD_NAND_OMAP_BCH + config MTD_NAND_IDS tristate diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 4bcdeb0..3580188 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_nand.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