[U-Boot] [PATCH 1/3 v2] 83xx: Default to using DMA to initializeSDRAM

Ira W. Snyder iws at ovro.caltech.edu
Thu Jul 9 02:58:50 CEST 2009


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:
> > > When SDRAM ECC is enabled and CONFIG_ECC_INIT_VIA_DDRCONTROLLER is not
> > > defined use DMA to set SDRAM to a known state.  Previously a 
> > > sequence of
> > > 64-bit stores was used.
> > 
> > IIRC, the DMA init SDRAM is slower than the 64bit stores.
> > It is why I added these code here.
> > 
> > I suggest to keep the way. 
> 
> According to Ira, the DMA method was faster than the cpu method:
> "It makes the DMA initialization normal speed again. The DMA in the for
> loop takes the longest (as expected).
> 
> So yes, strangely it (enabling the icache) makes a HUGE difference. The
> total time is <3 seconds now. It is now faster than the previous CPU
> method."
> 
> 
> Logically the DMA method should be faster, and Ira's results seem to
> reinforce this.  I don't have an 83xx board to test on, so let me know
> if others have different results than Ira.
> 

I didn't check the SDRAM init time with code, only by a rough estimate.
(Counting "one one-thousand, two one-thousand...").  I can add back the
time measuring code, and be really sure which one is faster.

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.

Ira


More information about the U-Boot mailing list