From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeroen Hofstee Date: Sat, 08 Nov 2014 22:18:31 +0100 Subject: [U-Boot] [PATCH v2 6/8] imx6: SPL support for iMX6 SabreSD In-Reply-To: <1415470977-40937-7-git-send-email-john.tobias.ph@gmail.com> References: <1415470977-40937-1-git-send-email-john.tobias.ph@gmail.com> <1415470977-40937-7-git-send-email-john.tobias.ph@gmail.com> Message-ID: <545E88A7.1020002@myspectrum.nl> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello John, On 08-11-14 19:22, John Tobias wrote: > This patch will enable the support for SPL on iMX6 SabreSD. > It tested on SD2 and SD3 mmc port. > --- > board/freescale/mx6sabresd/mx6sabresd.c | 216 ++++++++++++++++++++++++++++++++ > 1 file changed, 216 insertions(+) > > diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c > index 3d81fff..d090487 100644 > --- a/board/freescale/mx6sabresd/mx6sabresd.c > +++ b/board/freescale/mx6sabresd/mx6sabresd.c > @@ -607,3 +607,219 @@ int checkboard(void) > puts("Board: MX6-SabreSD\n"); > return 0; > } > > + > +void board_init_f(ulong dummy) > +{ > + u32 ram_size; > + > + /* Set the stack pointer. */ > + asm volatile("mov sp, %0\n" : : "r"(CONFIG_SPL_STACK)); > + > + ram_size = spl_dram_init(); > + > + arch_cpu_init(); > + > + /* Clear the BSS. */ > + memset(__bss_start, 0, __bss_end - __bss_start); > + > + /* Set global data pointer. */ > + gd = &gdata; > + gd->ram_size = ram_size; > + sp and gd should already be valid by the time board_init_f is called. There is no need to set them again. > + board_early_init_f(); > + > + timer_init(); > + > + preloader_console_init(); > + > + board_init_r(NULL, 0); > +} > + Regards, Jeroen