From: Wolfgang Denk Date: Wed, 07 Mar 2012 23:10:03 +0100 Subject: [U-Boot] RFC - how to support multipl DRAM chips in a single SPL build? In-Reply-To: <4F57A37C.8070501@logicpd.com> References: <4F57A37C.8070501@logicpd.com> Message-ID: <20120307221003.49E68202DA6@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 Peter Barada, In message <4F57A37C.8070501@logicpd.com> you wrote: > I'm trying to build a single SPL/u-boot that supports multiple Logic > OMAP 35x/37x boards, with multiple configurations of DRAM/NAND/NOR. On ARM this is still not not exactly a rampant feature (and some [mostly ARM] SoCs try to be clever and makeit extra hard for you), but for a large number of boards this has been a standard feature right since the beginning of U-Boot (and PPCBoot) twelf years ago. > This is to make our support/production much simpler, and allow one > SPL/u-boot "just work" on all or various boards. To do so I need to > figure out: > > 1) Probe for different DDR/NAND chips ... > 2) Probe for multiple configurations of NOR/NAND ... This is what get_ram_size() is good for. > Any suggestions on an approach are much appreciated! The normal approach is: set a configuration, run get_ram_size(), and store the detected size. Repeat for all configurations. The configuration that results in the biggest detected RAM size is the correct one. 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 Yes, it is written. Good shall always destroy evil. -- Sirah the Yang, "The Omega Glory", stardate unknown