From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felix Radensky Date: Thu, 05 May 2011 22:14:55 +0300 Subject: [U-Boot] Memory size detection on P1011 In-Reply-To: <20110505182440.867B0D60EB7@gemini.denx.de> References: <4DC2A352.8080505@embedded-sol.com> <1304602168.21927.16.camel@oslab-l1> <20110505182440.867B0D60EB7@gemini.denx.de> Message-ID: <4DC2F72F.2050009@embedded-sol.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, On 05/05/2011 09:24 PM, Wolfgang Denk wrote: > 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. I'm trying to do that, but get the same wrong memory size in both cases. On the other hand, if I program the correct number of banks from the start, get_ram_size() returns the correct size in both cases. The closest example of using get_ram_size() I've found is for MPC8548 TQM boards. But all these boards have 4-bank memory devices, so I'm sure my case was tested. Don't you think there can be a problem with reprogramming bank number in this particular DDR controller ? Felix.