
Dear York Sun,
In message 1304602168.21927.16.camel@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