From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 11 Dec 2009 16:51:23 +0100 Subject: [U-Boot] [PATCH V2 3/3] Add support for the LaCie ED Mini V2 board In-Reply-To: <20091207215632.303363F6CC@gemini.denx.de> References: <1258239796-21528-1-git-send-email-albert.aribaud@free.fr> <1258239796-21528-2-git-send-email-albert.aribaud@free.fr> <1258239796-21528-3-git-send-email-albert.aribaud@free.fr> <1258239796-21528-4-git-send-email-albert.aribaud@free.fr> <20091118222158.A05573F6C2@gemini.denx.de> <4B126F68.9020005@free.fr> <20091205003507.573673F6E3@gemini.denx.de> <4B1A05A9.4040104@free.fr> <20091207215632.303363F6CC@gemini.denx.de> Message-ID: <4B226A7B.6090401@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk a ?crit : > Dear Albert ARIBAUD, > > In message <4B1A05A9.4040104@free.fr> you wrote: >>> No, this is not correct. get_ram_size() is used always on a single >>> bank of memory only. >> Do you mean calling get_ram_size() four up to times based on the >> configured number of banks and configured sizes? I then fail to see the > > Yes, exactly. > >> added value of get_ram_size() wrt using the configured sizes directly. > > The added value is that get_ram_size() will detect (1) a lot of common > error situations and (2) will detect the actual size of the respective > memory banks. > > Assume you have a system where differentt types of memory chips can be > fit, or where you can insert memory modules. Then you configure for > the largest possible type, and get_ram_size() will detect what's > really present, so you can adjust the configuration. See the README > for details. > >>>> However I realize that this code is actually SoC-specific, not >>>> board-specific. It could be moved in cpu/arm926ejs/orion5x/dram.c, and >>>> then orion5x_sdram_{bar,bs} could be made static (or inlined). >>>> >>>> What do you think? >>> Seems to make sense. >> All right. Does doing that lift the requirement to use get_ram_size()? > > I see no reason yet why you would not want to use get_ram_size() - the > memory test feature alone is useful enough, even if you never intend > to use different RAM sizes. Ok. Considering the machine would have had fixed sized banks but the SoC would not, get_ram_size() indeed makes sense especially if I move the code to cpu/arm926ejs/orion5x/dram.c. I'll do that in V4 of the patch, once I get complete feedback for V3. Amicalement, -- Albert.