[U-Boot] Memory size detection on P1011

Wolfgang Denk wd at denx.de
Thu May 5 20:24:40 CEST 2011


Dear York Sun,

In message <1304602168.21927.16.camel at oslab-l1> you wrote:
> 
> I don't think get_ram_size works for your case. If you want to test the

You are wrong. We have been doing this for a long time on many boards
with similar properties.

> DDR to find the correct size, you have to initialize the DDR first. But
> you cannot do this correctly without knowing the number of banks. You
> may be able to blindly set the bank number and test the DDR to catch the

Incorrect number of banks will give different results than correct
number, so try both. The correct configuration is simply the one that
gives the maximum total memory size.

> error if there is any, but you have to run this code somewhere else, for
> example, in the flash (before relocation).

Of course the RAM init code runs before relocation.

> There might be another way. Do you have any board ID to distinguish
> these two kinds?

The recommended way is to use get_ram_size().

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Overdrawn?  But I still have checks left!


More information about the U-Boot mailing list