[U-Boot] [PATCH 12/12] imx: ventana: switch to SPL
Jeroen Hofstee
dasuboot at myspectrum.nl
Tue May 6 21:11:42 CEST 2014
Hello Tim,
On di, 2014-05-06 at 11:18 -0700, Tim Harvey wrote:
> On Mon, Apr 28, 2014 at 1:17 PM, Tim Harvey <tharvey at gateworks.com> wrote:
>
> void board_init_f(ulong dummy)
> {
> struct ventana_board_info ventana_info;
> int board_model;
>
> /* Set global data pointer. */
> gd = &gdata;
>
> /* setup AIPS and disable watchdog */
> arch_cpu_init();
>
> /* iomux and setup of i2c */
> board_early_init_f();
> i2c_setup_iomux();
>
> /* setup GP timer */
> timer_init();
>
> /* UART clocks enabled and gd valid - init serial console */
> preloader_console_init();
>
> /* read/validate EEPROM info to determine board model and SDRAM cfg */
> board_model = read_eeprom(I2C_GSC, &ventana_info);
>
> /* provide some some default: 32bit 128MB */
> if (GW_UNKNOWN == board_model) {
> ventana_info.sdram_width = 2;
> ventana_info.sdram_size = 3;
> }
>
> /* configure MMDC for SDRAM width/size and per-model calibration */
> spl_dram_init(8 << ventana_info.sdram_width,
> 16 << ventana_info.sdram_size,
> board_model);
>
> /* Clear the BSS. */
> memset(__bss_start, 0, __bss_end - __bss_start);
>
> /* load/boot image from boot device */
> board_init_r(NULL, 0);
> }
>
> Does this make sense?
Since Crt0.S already created gd on the stack before calling
board_init_f, can't the assignment of gd not simply be removed?
Is there anything special about gdata?
Regards,
Jeroen
More information about the U-Boot
mailing list