[U-Boot] [PATCH] ARMV7: OMAP4: Calculate SDRAM size

V, Aneesh aneesh at ti.com
Mon Sep 27 11:00:31 CEST 2010


Dear Wolfgang Denk,

> -----Original Message-----
> From: u-boot-bounces at lists.denx.de [mailto:u-boot-
> bounces at lists.denx.de] On Behalf Of V, Aneesh
> Sent: Monday, September 27, 2010 12:03 PM
> To: Wolfgang Denk; Nishanth Menon
> Cc: u-boot at lists.denx.de; Steve Sakoman
> Subject: Re: [U-Boot] [PATCH] ARMV7: OMAP4: Calculate SDRAM size
> 
> Dear Wolfgang Denk,
> 
> > -----Original Message-----
> > From: Wolfgang Denk [mailto:wd at denx.de]
> > Sent: Sunday, September 26, 2010 8:07 PM
> > To: Nishanth Menon
> > Cc: V, Aneesh; u-boot at lists.denx.de; Steve Sakoman
> > Subject: Re: [U-Boot] [PATCH] ARMV7: OMAP4: Calculate SDRAM size
> >
> > Dear Nishanth Menon,
> >
> > In message <4C9F3E4F.3040403 at gmail.com> you wrote:
> > >
> > > > I think you are referring to SDRAM initialization. Yes, it is
> > assumed
> > > > that SDRAM initialization(at least the DMM part of it) is done
> > before
> > > > the call to sdram_size(). The right location for this seems
> > > > to be the initial part of sdram_init().
> > >
> > > thanks for the clarification.. NOR boot is usually going to have
> > initial
> > > part in XIP -> we'd traditionally relocate to SDRAM before the
> > call to
> > > sdram_size() happens.
> >
> > Yes, this was the way how many ARM boards id, and this is what I'm
> > trying to explain: this is WRONG.
> >
> > SDRAM configuration must be done while still running from NOR, i.
> e.
> > before relocation. Only then free reconfiguration, auto-sizing
> etc.
> > is
> > possible.
> 
> We shall rework the patch to do SDRAM size calculation as part of
> 'lowlevel_init' that is called before relocation. I hope that should
> solve the problem.

I realize that gd will not be setup at this point of time. So, I would
propose keeping the same patch. sdram_size() can be called at any point of time as SDRAM is initialized by the time u-boot starts.
We can do whatever extra needed to support the new relocation scheme 
once those patches are upstream.

> 
> Please note that we are always running from SDRAM because none of
> the OMAP4 boards so far have any XIP device.
> 
> Regarding true run-time detection of SDRAM size and configuration:
> We do not support it today. However, LPDDR2 supports Mode Registers
> that have size info and our memory controller can read it. This
> coupled with the base AC timings specified by the LPDDR2 spec
> creates the possibility of doing a truly run-time detection and
> configuration of SDRAM that works for all boards. I was indeed
> thinking of trying it out sometime. Please note that the base AC
> timing values may not be optimal for all memory parts.
> 

Best regards,
Aneesh



More information about the U-Boot mailing list