public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7] nand/denali: Adding Denali NAND driver support
Date: Fri, 11 Apr 2014 17:43:11 -0500	[thread overview]
Message-ID: <1397256191.20280.171.camel@snotra.buserror.net> (raw)
In-Reply-To: <20140404173118.D724.AA925319@jp.panasonic.com>

On Fri, 2014-04-04 at 17:31 +0900, Masahiro Yamada wrote:
> So my question is, what should we do to improve the performance?
> Is it a bad idea to use DMA?
> 
> 
> The sequence of page_read in this patch is like this:
> (1) Cache flush of DMA buffer area
> (2) DMA transfer from NAND device to DMA buffer
> (3) memcpy()  from DMA buffer to destination memory
> 
> In Linux Kernel,  I guess there is  DMA sync process between (2) and (3).
> But we don't have DMA API in U-Boot.

flush_dcache_range() plays the same role as the Linux DMA sync.

> If we do not use DMA, the read sequence is like this
> (1) Copy data directly from NAND register to destination memory
> 
> According to my benchmark, this is about twice faster.

Have you measured the performance in the Linux driver?

> Scott, do you have any advice?

Do some profiling to see where the time is spent.  I don't know how easy
it is to do automated profiling of U-Boot, but you could add some manual
instrumentation of the driver to measure min/avg/max/total time taken
over various intervals.

-Scott

  reply	other threads:[~2014-04-11 22:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24 15:10 [U-Boot] [PATCH v7] nand/denali: Adding Denali NAND driver support Chin Liang See
2014-03-28  9:21 ` Masahiro Yamada
2014-03-28 14:58   ` Chin Liang See
2014-04-04  8:31     ` Masahiro Yamada
2014-04-11 22:43       ` Scott Wood [this message]
2014-04-18 11:41         ` Masahiro Yamada
2014-04-23  7:06           ` Chin Liang See
2014-04-24 10:22             ` Masahiro Yamada
2014-05-07  3:48             ` Masahiro Yamada
2014-05-26  4:58             ` Masahiro Yamada
2014-05-27  9:54               ` Chin Liang See

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=1397256191.20280.171.camel@snotra.buserror.net \
    --to=scottwood@freescale.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