From patchwork Wed Oct 1 11:33:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 38231 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 885DE202E7 for ; Wed, 1 Oct 2014 11:34:11 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id a1sf462050wgh.5 for ; Wed, 01 Oct 2014 04:34:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=luzLOffyrFypR0aAxkSowNSl4HbWZYyj/Cpe0u4NF1Y=; b=VlTWhc79tcW0hDQWedGK1s3wiT1eC9RCKmaEp7XqWAX59EDCyW5ZvVT3AVfujyC3KS AvupDxDWrTLP8wL/baKw6Sa/JPW9BlmAiY08vDYmJWHhqXAj0RK7riWGamHDmsgcNMar otix5tzGYO8Xj70lUCh9xXKPg3P3/9Dzn4RDlBCOmEpe5cKfTPEeBnS3oe5PSOoJQv6B UBN/bthwbQJ9tiLHzmjYljp9U3pEcDngAkzxnBf37CnmC5Xw1a1VM+chRPitHtDdq6aG MiX3Neh+oNEuxd5cDX61kPiWgrKSgUyrPv6v/JkTSKkBdepsKXDMz7pHoqvT9c8AIUAv jAQA== X-Gm-Message-State: ALoCoQkMvY1YHO3Xra/V0qbF+CIPxI/6D+pplUmuKC9HhfaEaw/gkW6KpEQWHDOTiM/3rTlp9Zpd X-Received: by 10.180.160.169 with SMTP id xl9mr2048685wib.7.1412163250686; Wed, 01 Oct 2014 04:34:10 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.201 with SMTP id u9ls150455lau.107.gmail; Wed, 01 Oct 2014 04:34:10 -0700 (PDT) X-Received: by 10.112.144.106 with SMTP id sl10mr2295851lbb.68.1412163250327; Wed, 01 Oct 2014 04:34:10 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49]) by mx.google.com with ESMTPS id qi3si1210704lbb.41.2014.10.01.04.34.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 01 Oct 2014 04:34:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id q1so114697lam.36 for ; Wed, 01 Oct 2014 04:34:09 -0700 (PDT) X-Received: by 10.153.6.36 with SMTP id cr4mr20113779lad.40.1412163249917; Wed, 01 Oct 2014 04:34:09 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp512180lbb; Wed, 1 Oct 2014 04:34:09 -0700 (PDT) X-Received: by 10.69.17.99 with SMTP id gd3mr22894077pbd.158.1412163248303; Wed, 01 Oct 2014 04:34:08 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ki1si715744pbd.5.2014.10.01.04.34.07 for ; Wed, 01 Oct 2014 04:34:08 -0700 (PDT) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751831AbaJALeH (ORCPT + 5 others); Wed, 1 Oct 2014 07:34:07 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:55369 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751092AbaJALeF (ORCPT ); Wed, 1 Oct 2014 07:34:05 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s91BXdDN006141; Wed, 1 Oct 2014 06:33:39 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s91BXdG6006081; Wed, 1 Oct 2014 06:33:39 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Wed, 1 Oct 2014 06:33:39 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s91BXWhO031242; Wed, 1 Oct 2014 06:33:36 -0500 From: Roger Quadros To: CC: , , , , , , , Ezequiel Garcia , Roger Quadros Subject: [PATCH v2 1/2] mtd: nand: Force omap_elm to be built as a module if omap2_nand is a module Date: Wed, 1 Oct 2014 14:33:29 +0300 Message-ID: <1412163210-12948-2-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1412163210-12948-1-git-send-email-rogerq@ti.com> References: <1412163210-12948-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: rogerq@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Ezequiel Garcia 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 Signed-off-by: Ezequiel Garcia Signed-off-by: Roger Quadros --- 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