From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 24 Jul 2014 15:00:30 -0600 Subject: [U-Boot] [PATCH] ARM: tegra: Use mem size from MC rather than ODMDATA In-Reply-To: <20140703110121.GG29202@bill-the-cat> References: <1404331950-4916-1-git-send-email-swarren@wwwdotorg.org> <20140702211821.3EFF6380185@gemini.denx.de> <53B47F6F.1090405@wwwdotorg.org> <20140703074552.23B59380996@gemini.denx.de> <20140703110121.GG29202@bill-the-cat> Message-ID: <53D173EE.5090905@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 07/03/2014 05:01 AM, Tom Rini wrote: > On Thu, Jul 03, 2014 at 09:45:52AM +0200, Wolfgang Denk wrote: >> Dear Stephen, >> >> In message <53B47F6F.1090405@wwwdotorg.org> you wrote: >>> >>>> Is there a specific reason for not using get_ram_size()? >>> >>> Since we know the exact RAM size, we may as well simply use it directly >>> rather than "probing" for it. >> >> You _think_ you know the size, but you can never be sure that all this >> RAM is actually present and working. There has been many discussions >> before why using get_ram_size() makes a lot of sense even in fixed >> size RAM configurations. > > Right which is why the flow in this case is: > 1) Read the place that "knows" > 2) Pass that size to get_ram_size(), use returned value as what we > really know the size to be. Wolfgang, given Tom's explanation, are you now OK with this patch? TomW would like clarification? But to address your points: We really do know that the RAM size is equal to what this register says, since at this point in the code, U-Boot is already running in RAM (since our HW's boot ROM initializes RAM and copies U-Boot to it). Any issues with the RAM itself, either bad HW or incorrect configuration, would already have caused a problem just executing any code.