From patchwork Sat Sep 22 00:01:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 185980 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 0CCFD2C0081 for ; Sat, 22 Sep 2012 10:03:59 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 19893280D4; Sat, 22 Sep 2012 02:03:50 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vIYlZJxIBHRP; Sat, 22 Sep 2012 02:03:49 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6CA6F280DC; Sat, 22 Sep 2012 02:02:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 76AF22809C for ; Sat, 22 Sep 2012 02:01:50 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jqkp4saw2BZA for ; Sat, 22 Sep 2012 02:01:48 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe004.messaging.microsoft.com [216.32.181.184]) by theia.denx.de (Postfix) with ESMTPS id 61FEF280A2 for ; Sat, 22 Sep 2012 02:01:43 +0200 (CEST) Received: from mail38-ch1-R.bigfish.com (10.43.68.235) by CH1EHSOBE011.bigfish.com (10.43.70.61) with Microsoft SMTP Server id 14.1.225.23; Sat, 22 Sep 2012 00:01:41 +0000 Received: from mail38-ch1 (localhost [127.0.0.1]) by mail38-ch1-R.bigfish.com (Postfix) with ESMTP id DF27F26015E for ; Sat, 22 Sep 2012 00:01:41 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 2 X-BigFish: VS2(z551bizd6f1izz1202h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah107ah1288h12a5h12a9h12bdh12e5h137ah1155h) Received: from mail38-ch1 (localhost.localdomain [127.0.0.1]) by mail38-ch1 (MessageSwitch) id 1348272099424901_7435; Sat, 22 Sep 2012 00:01:39 +0000 (UTC) Received: from CH1EHSMHS028.bigfish.com (snatpool3.int.messaging.microsoft.com [10.43.68.227]) by mail38-ch1.bigfish.com (Postfix) with ESMTP id 54C80440053 for ; Sat, 22 Sep 2012 00:01:39 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS028.bigfish.com (10.43.70.28) with Microsoft SMTP Server (TLS) id 14.1.225.23; Sat, 22 Sep 2012 00:01:38 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.2.309.3; Fri, 21 Sep 2012 19:01:38 -0500 Received: from snotra.am.freescale.net ([10.214.86.161]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id q8M01SkW024526; Fri, 21 Sep 2012 17:01:37 -0700 From: Scott Wood To: Date: Fri, 21 Sep 2012 19:01:21 -0500 Message-ID: <1348272087-29608-12-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1348272087-29608-1-git-send-email-scottwood@freescale.com> References: <1348272087-29608-1-git-send-email-scottwood@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com Subject: [U-Boot] [RFC PATCH 11/17] spl/nand: introduce CONFIG_SPL_NAND_MINIMAL X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This will be used by SPL builds that do not use the standard nand_base.c and friends. Signed-off-by: Scott Wood --- README | 3 +++ drivers/mtd/nand/Makefile | 41 +++++++++++++++++++++++++++++++---------- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/README b/README index 8e07d41..5a57a14 100644 --- a/README +++ b/README @@ -2637,6 +2637,9 @@ FIT uImage format: CONFIG_SPL_NAND_SIMPLE Support for drivers/mtd/nand/libnand.o in SPL binary + CONFIG_SPL_NAND_MINIMAL + Do not build the standard NAND subsystem files. + CONFIG_SYS_NAND_5_ADDR_CYCLE, CONFIG_SYS_NAND_PAGE_COUNT, CONFIG_SYS_NAND_PAGE_SIZE, CONFIG_SYS_NAND_OOBSIZE, CONFIG_SYS_NAND_BLOCK_SIZE, CONFIG_SYS_NAND_BAD_BLOCK_POS, diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 29dc20e..5be1270 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -26,21 +26,40 @@ include $(TOPDIR)/config.mk LIB := $(obj)libnand.o ifdef CONFIG_CMD_NAND + ifdef CONFIG_SPL_BUILD -ifdef CONFIG_SPL_NAND_SIMPLE -COBJS-y += nand_spl_simple.o -endif -ifdef CONFIG_SPL_NAND_LOAD -COBJS-y += nand_spl_load.o -endif + +ifdef CONFIG_SPL_NAND_MINIMAL +# minimal-only files go here else +CONFIG_SPL_NAND_ECC=y +CONFIG_SPL_NAND_BASE=y +CONFIG_SPL_NAND_DRIVERS=y +endif + +COBJS-$(CONFIG_SPL_NAND_SIMPLE) += nand_spl_simple.o +COBJS-$(CONFIG_SPL_NAND_LOAD) += nand_spl_load.o + +else # not spl + +# Further references to these symbols in this file mean, +# "Build this if we're not in SPL, or if we're in SPL and the symbol was set." +CONFIG_SPL_NAND_ECC=y +CONFIG_SPL_NAND_BASE=y +CONFIG_SPL_NAND_DRIVERS=y + COBJS-y += nand.o COBJS-y += nand_bbt.o COBJS-y += nand_ids.o COBJS-y += nand_util.o -endif -COBJS-y += nand_ecc.o -COBJS-y += nand_base.o + +endif # not spl + +COBJS-$(CONFIG_SPL_NAND_ECC) += nand_ecc.o +COBJS-$(CONFIG_SPL_NAND_BASE) += nand_base.o + +ifdef CONFIG_SPL_NAND_DRIVERS + COBJS-$(CONFIG_NAND_ECC_BCH) += nand_bch.o COBJS-$(CONFIG_NAND_ATMEL) += atmel_nand.o @@ -64,7 +83,9 @@ COBJS-$(CONFIG_NAND_S3C64XX) += s3c64xx.o COBJS-$(CONFIG_NAND_SPEAR) += spr_nand.o COBJS-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o COBJS-$(CONFIG_NAND_PLAT) += nand_plat.o -endif + +endif # drivers +endif # nand COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c)