From patchwork Mon Oct 31 17:30:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Yanok X-Patchwork-Id: 122900 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 0F502B6F84 for ; Tue, 1 Nov 2011 04:30:34 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1A16929154; Mon, 31 Oct 2011 18:30:32 +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 Y299vLWy4Rjz; Mon, 31 Oct 2011 18:30:31 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E1B222915F; Mon, 31 Oct 2011 18:30:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B6D8C2915F for ; Mon, 31 Oct 2011 18:30:24 +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 ragxOgUv2gD7 for ; Mon, 31 Oct 2011 18:30:23 +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 ocean.emcraft.com (ocean.emcraft.com [213.221.7.182]) by theia.denx.de (Postfix) with ESMTPS id E46A129154 for ; Mon, 31 Oct 2011 18:30:21 +0100 (CET) Received: from localhost ([127.0.0.1] helo=[IPv6:::1]) by ocean.emcraft.com with esmtp (Exim 4.76) (envelope-from ) id 1RKvgh-0005Yb-JU; Mon, 31 Oct 2011 20:30:19 +0300 Message-ID: <4EAEDB4F.70509@emcraft.com> Date: Mon, 31 Oct 2011 21:30:55 +0400 From: Ilya Yanok User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20111005 Icedove/3.1.15 MIME-Version: 1.0 To: Simon Schwarz References: <1318894433-9038-1-git-send-email-yanok@emcraft.com> <1318894433-9038-6-git-send-email-yanok@emcraft.com> <4EA00D56.9070103@gmail.com> <4EA03CFB.8040302@emcraft.com> <4EA152C9.1040407@gmail.com> In-Reply-To: <4EA152C9.1040407@gmail.com> Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH 5/7] 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Hi Simon, On 21.10.2011 15:08, Simon Schwarz wrote: > Another thing just poped into my mind, ATM I have a DMA patch for > devkit8000 on the ML: > http://article.gmane.org/gmane.comp.boot-loaders.u-boot/109744 > http://article.gmane.org/gmane.comp.boot-loaders.u-boot/112661 > > It speeds up the process of copying the u-boot/linux image. ATM this is > in combination with HW ecc and I doubt that it will work seamlessly with > SW-ecc, yet. However IMHO DMA in combination with SW-ecc could be nearly > as fast as using HW-ecc. > > So maybe an adaption is worth a try? Ok, I've finally taken a look at it. Adaption is very straight forward actually. This works for me: if (ecc_wait.valid != 0) Regards, Ilya. diff --git a/drivers/mtd/nand/nand_spl_simple.c b/drivers/mtd/nand/nand_spl_simple.c index 1402a35..1248f8f 100644 --- a/drivers/mtd/nand/nand_spl_simple.c +++ b/drivers/mtd/nand/nand_spl_simple.c @@ -284,7 +284,8 @@ static int nand_read_page_dma(int block, int page, void *dst) for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { res += omap3_dma_conf_transfer(0, nand_chip.IO_ADDR_R, (uint32_t *)p, CONFIG_SYS_NAND_ECCSIZE/4); - this->ecc.hwctl(&mtd, NAND_ECC_READ); + if (this->ecc.mode != NAND_ECC_SOFT) + this->ecc.hwctl(&mtd, NAND_ECC_READ); res += omap3_dma_start_transfer(0); /* correct ecc from former transfer */