From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Thu, 15 Jul 2004 10:40:19 +0200 Subject: [U-Boot-Users] Q about automatic dram size detection in sdram_init() In-Reply-To: <20040715075508.AAFB5C109F@atlas.denx.de> Message-ID: <001801c46a47$5c2ea6c0$0212000a@PCSTEFAN> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang! > > The code works fine on all different memory configutations. This is > > because of the mirroring of the written values. For example > on a system > > with 64MByte SDRAM a write to "ADDR_64MB" will mirror to one of the > > smaller addresses and the current test will fail! So this > is perfectly > > OK. > > If you have a 64MB system, I'd expect that a write to ADDR_64MB > succeeds? The memory controller is previously setup to 128MB. So a write to 64MB is OK, and _will_ be mirrored to a lower address on a 64MB system! I agree that the code is pretty ugly and I am thinking about reworking it. Best regards, Stefan Roese