From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 11 Jul 2012 01:19:40 -0700 Subject: [U-Boot] [PATCH V3 2/3] arm/davinci: spl - boot device selection In-Reply-To: <20120711063824.GA26793@Hardy> References: <1341860020-11507-1-git-send-email-mikhail.kshevetskiy@gmail.com> <1341860020-11507-2-git-send-email-mikhail.kshevetskiy@gmail.com> <20120710183906.GA24958@Hardy> <20120710232053.7bfb3858@weasel.local> <20120711063824.GA26793@Hardy> Message-ID: <4FFD371C.5000704@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 07/10/2012 11:38 PM, Sughosh Ganu wrote: > On Tue Jul 10, 2012 at 11:20:53PM +0400, Mikhail Kshevetskiy wrote: >> On Wed, 11 Jul 2012 00:09:06 +0530 >> Sughosh Ganu wrote: >>>> diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c >>>> b/arch/arm/cpu/arm926ejs/davinci/spl.c index 74632e5..50b4bbc 100644 >>>> --- a/arch/arm/cpu/arm926ejs/davinci/spl.c >>>> +++ b/arch/arm/cpu/arm926ejs/davinci/spl.c >>> >>> >>> >>>> void board_init_r(gd_t *id, ulong dummy) >>>> { >>>> -#ifdef CONFIG_SPL_NAND_LOAD >>>> - nand_init(); >>>> - puts("Nand boot...\n"); >>>> - nand_boot(); >>>> -#endif >>>> -#ifdef CONFIG_SPL_SPI_LOAD >>>> - mem_malloc_init(CONFIG_SYS_TEXT_BASE - CONFIG_SYS_MALLOC_LEN, >>>> - CONFIG_SYS_MALLOC_LEN); >>>> + u32 boot_device; >>>> + void (*uboot)(void) __noreturn; >>>> + >>>> + mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START, >>>> + CONFIG_SYS_SPL_MALLOC_SIZE); >>> >>> We do not need any heap for the spl on the hawkboard, so can you >>> please explain why do we need the heap allocation for all spl >>> images. Can't this be made configurable. >> >> this is needed at least for: >> * MMC support >> * SPI support >> * gunzip support (see next patch) >> >> it can be configurable, but is it reasonable? > > I would think so -- i guess it should be fine to include this only for > boards/configurations that actually need the heap. Shouldn't "load u-boot.img from vfat SD card" be a common case at least for developers? -- Tom