From: Wolfgang Denk Date: Thu, 16 Jul 2009 16:22:29 +0200 Subject: [U-Boot] [PATCH 1/1] Add support for Eukrea CPU9260 SBC In-Reply-To: <4A5F20DB.2000009@eukrea.com> References: <1247735589-15527-1-git-send-email-eric@eukrea.com> <20090716122936.08360832E416@gemini.denx.de> <4A5F20DB.2000009@eukrea.com> Message-ID: <20090716142229.C66BC832E416@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear =?ISO-8859-1?Q?Eric_B=E9nard?=, In message <4A5F20DB.2000009@eukrea.com> you wrote: > > > How about using get_ram_size() for auto-sizing and testing? > > > the RAM needs to be properly initialized in low level before being able > to test it so its geometry (rom/columns) and timings must be known > before being able to detect its size using get_ram_size. Indeed. That's the same on all board - including the many that successfully use get_ram_size() > I'm not sure it's possible to use a generic geometry/timings there else > u-boot may never relocate. > How would you do this ? Well, normally you have 2 or 3 row/col combinations that have to be considered; you try these in turn until you find one where get_ram_size() returns a non-zero size; if several work, you use that which returns the biggest size. See for example "board/tqc/tqm8xx/tqm8xx.c" - it tries 8, 9 and 10 column mode... Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Lady Nancy Astor: "Winston, if you were my husband, I'd put poison in your coffee." Winston Churchill: "Nancy, if you were my wife, I'd drink it."