public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ilya Yanok <yanok@emcraft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/7] omap_gpmc: use SOFTECC in SPL if it's enabled
Date: Mon, 31 Oct 2011 21:30:55 +0400	[thread overview]
Message-ID: <4EAEDB4F.70509@emcraft.com> (raw)
In-Reply-To: <4EA152C9.1040407@gmail.com>

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:

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 */
                if (ecc_wait.valid != 0)

Regards, Ilya.

  parent reply	other threads:[~2011-10-31 17:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17 23:33 [U-Boot] [PATCH 0/7] NAND SPL support for mcx board Ilya Yanok
2011-10-17 23:33 ` [U-Boot] [PATCH 1/7] omap3/emif4: fix registers definition Ilya Yanok
2011-10-17 23:33 ` [U-Boot] [PATCH 2/7] omap/spl: don't assume u-boot.bin size, use CONFIG_SYS_NAND_U_BOOT_SIZE Ilya Yanok
2011-10-17 23:43   ` Tom Rini
2011-10-17 23:50     ` Ilya Yanok
2011-10-31 12:38     ` Ilya Yanok
2011-10-31 14:43       ` Tom Rini
2011-10-17 23:33 ` [U-Boot] [PATCH 3/7] omap/spl: actually enable the console Ilya Yanok
2011-10-19 19:24   ` Tom Rini
2011-10-31 12:39     ` Ilya Yanok
2011-10-31 14:44       ` Tom Rini
2011-10-17 23:33 ` [U-Boot] [PATCH 4/7] nand_spl_simple: add support for software ECC Ilya Yanok
2011-10-17 23:33 ` [U-Boot] [PATCH 5/7] omap_gpmc: use SOFTECC in SPL if it's enabled Ilya Yanok
2011-10-20 12:00   ` Simon Schwarz
2011-10-20 15:23     ` Ilya Yanok
2011-10-21 11:08       ` Simon Schwarz
2011-10-27 20:27         ` Ilya Yanok
2011-10-31 17:30         ` Ilya Yanok [this message]
2011-10-17 23:33 ` [U-Boot] [PATCH 6/7] nand_spl_simple: store temp data at CONFIG_SPL_NAND_WORKSPACE Ilya Yanok
2011-10-17 23:33 ` [U-Boot] [PATCH 7/7] mcx: NAND SPL support Ilya Yanok

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EAEDB4F.70509@emcraft.com \
    --to=yanok@emcraft.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox