From patchwork Tue Nov 1 23:16:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Yanok X-Patchwork-Id: 123180 X-Patchwork-Delegate: scottwood@freescale.com 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 05C40B6F88 for ; Wed, 2 Nov 2011 10:18:53 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CED39294E8; Wed, 2 Nov 2011 00:17:42 +0100 (CET) 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 Q2dH1pYVGW9Q; Wed, 2 Nov 2011 00:17:42 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4B95B29043; Wed, 2 Nov 2011 00:16:39 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E9D1228FE0 for ; Wed, 2 Nov 2011 00:16:25 +0100 (CET) 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 pwowDwfxFSkY for ; Wed, 2 Nov 2011 00:16:24 +0100 (CET) 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 pollux.denx.de (host-82-135-33-74.customer.m-online.net [82.135.33.74]) by theia.denx.de (Postfix) with ESMTP id 14D3028FCD for ; Wed, 2 Nov 2011 00:16:18 +0100 (CET) Received: by pollux.denx.de (Postfix, from userid 547) id 087A1A454; Wed, 2 Nov 2011 00:16:16 +0100 (CET) From: Ilya Yanok To: u-boot@lists.denx.de, wd@denx.de, dzu@denx.de, sasha_d@emcraft.com Date: Wed, 2 Nov 2011 00:16:05 +0100 Message-Id: <1320189368-9763-12-git-send-email-yanok@emcraft.com> X-Mailer: git-send-email 1.7.6.4 In-Reply-To: <1320189368-9763-1-git-send-email-yanok@emcraft.com> References: <1320189368-9763-1-git-send-email-yanok@emcraft.com> Cc: Ilya Yanok Subject: [U-Boot] [PATCH 11/14] omap_gpmc: use SOFTECC in SPL if it's enabled X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Use software ECC for the SPL build if support for software ECC in SPL is enabled. Signed-off-by: Ilya Yanok --- drivers/mtd/nand/omap_gpmc.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c index 5bbec48..1dfe074 100644 --- a/drivers/mtd/nand/omap_gpmc.c +++ b/drivers/mtd/nand/omap_gpmc.c @@ -348,7 +348,7 @@ int board_nand_init(struct nand_chip *nand) nand->chip_delay = 100; /* Default ECC mode */ -#ifndef CONFIG_SPL_BUILD +#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_NAND_SOFTECC) nand->ecc.mode = NAND_ECC_SOFT; #else nand->ecc.mode = NAND_ECC_HW; @@ -359,7 +359,9 @@ int board_nand_init(struct nand_chip *nand) nand->ecc.correct = omap_correct_data; nand->ecc.calculate = omap_calculate_ecc; omap_hwecc_init(nand); +#endif +#ifdef CONFIG_SPL_BUILD if (nand->options & NAND_BUSWIDTH_16) nand->read_buf = nand_read_buf16; else