[U-Boot] [PATCH v7] nand/denali: Adding Denali NAND driver support

Scott Wood scottwood at freescale.com
Sat Apr 12 00:43:11 CEST 2014


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




More information about the U-Boot mailing list