public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3 v2] 83xx: Default to using DMA	to	initialize SDRAM
Date: Thu, 09 Jul 2009 13:00:23 -0400	[thread overview]
Message-ID: <4A562227.2020803@ge.com> (raw)
In-Reply-To: <20090709155823.GA29383@ovro.caltech.edu>

Ira W. Snyder wrote:
> On Wed, Jul 08, 2009 at 05:58:50PM -0700, Ira W. Snyder wrote:
>> On Wed, Jul 08, 2009 at 07:32:26PM -0500, Peter Tyser wrote:
>>> On Thu, 2009-07-09 at 08:24 +0800, Liu Dave-R63238 wrote:

[snip]

>> Both the DMA and CPU methods are definitely on the same order of
>> magnitude. The time taken by the CFI flash driver is MUCH longer than
>> the SDRAM initialization. I wonder, should the icache be enabled for
>> that as well?
>>
>> I'll do some more testing when I get back to the office tomorrow.
>>
> 
> Ok, I've added back the get_tbms() code, and created a routine to
> initialize ECC with the CPU. I've inlined my patch below, just for
> reference.
> 
> DMA 945ms
> CPU 581ms
> 
> As an interesting comparison, I also benchmarked the method of using the
> DDR controller to initialize ECC.
> 
> DDRC 129ms
> 
> So there you have it. Dave Liu is correct, the CPU method is faster,
> though definitely on the same order of magnitude with the
> icache_enable()/icache_disable() patch.

Thanks for the measurements and the update.

> I may stick with the DDRC method on my board, the difference is just
> amazing. The flash init still takes up most of the boot process,
> however.
> 
> Peter, feel free to fold the patch below into your own work.
> Ira

[snip]

FWIIW, and it doesn't materially change your results, but it would have 
been better to duplicate the get_tbms() call and put it directly around 
the *_meminit() calls rather than having the print statements inside the 
timed part.  Since U-Boot printing is a blocking call (generally), you 
are adding the UART Tx time to your measurement.

#if 0
	debug("\nInitializing ECC (using DMA)!\n");
	s = get_tbms();
  	dma_meminit(CONFIG_MEM_INIT_VALUE, dram_size);
#else
	debug("\nInitializing ECC (using CPU)!\n");
	s = get_tbms();
	cpu_meminit(CONFIG_MEM_INIT_VALUE, dram_size);
#endif
	e = get_tbms();


> +	s = get_tbms();
> +#if 0
> +	debug("\nInitializing ECC (using DMA)!\n");
>  	dma_meminit(CONFIG_MEM_INIT_VALUE, dram_size);
> +#else
> +	debug("\nInitializing ECC (using CPU)!\n");
> +	cpu_meminit(CONFIG_MEM_INIT_VALUE, dram_size);
> +#endif
> +	e = get_tbms();
>  
>  	debug("\nREADY!\n");
> +	debug("ddr init duration: %ld ms\n", e - s);
>  
>  	/* Clear All ECC Errors */
>  	if ((ddr->err_detect & ECC_ERROR_DETECT_MME) == ECC_ERROR_DETECT_MME)

Thanks,
gvb

  reply	other threads:[~2009-07-09 17:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09  0:11 [U-Boot] [PATCH 0/3 v2] DMA ECC update Peter Tyser
2009-07-09  0:11 ` [U-Boot] [PATCH 1/3 v2] 83xx: Default to using DMA to initialize SDRAM Peter Tyser
2009-07-09  0:24   ` [U-Boot] [PATCH 1/3 v2] 83xx: Default to using DMA to initializeSDRAM Liu Dave-R63238
2009-07-09  0:32     ` Peter Tyser
2009-07-09  0:43       ` Liu Dave-R63238
2009-07-09 12:39         ` Jerry Van Baren
2009-07-09 12:51           ` Jerry Van Baren
2009-07-09  0:58       ` Ira W. Snyder
2009-07-09 15:58         ` [U-Boot] [PATCH 1/3 v2] 83xx: Default to using DMA to initialize SDRAM Ira W. Snyder
2009-07-09 17:00           ` Jerry Van Baren [this message]
2009-07-14  9:22   ` Wolfgang Denk
2009-07-14 14:41     ` Kumar Gala
2009-07-14 14:42     ` Peter Tyser
2009-07-14 15:21       ` Wolfgang Denk
2009-07-14 17:32       ` Kim Phillips
2009-07-14 18:37         ` Peter Tyser
2009-07-09  0:11 ` [U-Boot] [PATCH 2/3 v2] 83xx: Add CONFIG_MEM_INIT_VALUE for boards with ECC Peter Tyser
2009-07-09  0:11 ` [U-Boot] [PATCH 3/3 v2] fsl_dma: Fix SDRAM initial value Peter Tyser

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=4A562227.2020803@ge.com \
    --to=gerald.vanbaren@ge.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