From: Tom Rini Date: Fri, 6 Jun 2014 17:54:53 -0400 Subject: [U-Boot] [U-Boot, 1/2] arm:am33xx: Make dram_init call sdram_init() in some contexts In-Reply-To: <1400691442-32621-2-git-send-email-trini@ti.com> References: <1400691442-32621-2-git-send-email-trini@ti.com> Message-ID: <20140606215453.GD7841@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, May 21, 2014 at 12:57:21PM -0400, Tom Rini wrote: > We have two contexts for booting these platforms. One is SPL which is > roughly: reset, cpu_init_crit, lowlevel_init, s_init, sdram_init, _main, > board_init_f from SPL, ... then U-Boot loads. The other is a > memory-mapped XIP case (NOR or QSPI) where we do not run an SPL. In > this case we go, roughly: reset, cpu_init_crit, lowlevel_init, s_init, > _main, regular board_init_f. > > In the first case s_init will set a valid gd and then be able to call > sdram_init which in many cases will need i2c (which needs a valid gd for > gd->cur_i2c_bus). In this second case we must (and are able to and > should) defer sdram_init() into dram_init() called by board_init_f as gd > will have been set in _main and cleared in board_init_f. > > Signed-off-by: Tom Rini Applied to u-boot-ti/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: