[U-Boot] [PATCH v2 6/8] imx6: SPL support for iMX6 SabreSD

Jeroen Hofstee jeroen at myspectrum.nl
Sat Nov 8 22:18:31 CET 2014


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.
> ---

<snip>
>   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




More information about the U-Boot mailing list