From: Tom Rini Date: Wed, 5 Jun 2019 15:51:38 -0400 Subject: [U-Boot] [PATCH v3 2/2] ARM: davinci: SPL: fix BSS initialization In-Reply-To: <20190530133455.24926-3-nsekhar@ti.com> References: <20190530133455.24926-1-nsekhar@ti.com> <20190530133455.24926-3-nsekhar@ti.com> Message-ID: <20190605195138.GM10942@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 Thu, May 30, 2019 at 07:04:55PM +0530, Sekhar Nori wrote: > U-Boot README recommends initializing SDRAM in board_init_f(). DA850 > was doing it as part of board_init_r() (through call to spl_board_init() > which calls arch_cpu_init() which calls da850_ddr_setup()) > > This worked fine till commit 15b8c7505819 ("davinci: > da850evm/omapl138-lcdk: Move BSS to SDRAM because SRAM is full") moved > BSS to SDRAM. > > Functions like mmc_initialize() called in board_init_r() assume BSS is > available. Since SDRAM was not initialized when arch/arm/lib/crt0.S tried > to initialize BSS to 0, BSS is not initialized correctly. > > Fix this by simply calling arch_cpu_init() from board_init_f(). Also move > preloader_console_init() there to help debug issues with board_init_r(). > > With this spl_board_init() is no longer needed, we remove it. > > Tested using MMC/SD boot on OMAP-L138 LCDK board. > > Tested-by: Adam Ford #da850evm > Signed-off-by: Sekhar Nori > Tested-by: Peter Howard #omapl138_lcdk Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: