return 0;
}
+#ifndef CONFIG_SYS_NO_FLASH
static void display_flash_config(ulong size)
{
puts("Flash: ");
print_size(size, "\n");
}
+#endif
/*
* Breath some life into the board...
static int calculate_relocation_address(void)
{
- void *text_start = &__text_start;
- void *bss_end = &__bss_end;
- void *dest_addr;
+ ulong text_start = (ulong)&__text_start;
+ ulong bss_end = (ulong)&__bss_end;
+ ulong dest_addr;
ulong rel_offset;
/* Calculate destination RAM Address and relocation offset */
- dest_addr = (void *)gd->ram_size;
+ dest_addr = gd->ram_size;
dest_addr -= CONFIG_SYS_STACK_SIZE;
dest_addr -= (bss_end - text_start);
+
+ /*
+ * Round destination address down to 16-byte boundary to keep
+ * IDT and GDT 16-byte aligned
+ */
+ dest_addr &= ~15;
+
rel_offset = dest_addr - text_start;
gd->start_addr_sp = gd->ram_size;
- gd->relocaddr = (ulong)dest_addr;
+ gd->relocaddr = dest_addr;
gd->reloc_off = rel_offset;
return 0;
void board_init_r(gd_t *id, ulong dest_addr)
{
+#if defined(CONFIG_CMD_NET)
char *s;
+#endif
+#ifndef CONFIG_SYS_NO_FLASH
ulong size;
+#endif
static bd_t bd_data;
static gd_t gd_data;
init_fnc_t **init_fnc_ptr;
#ifdef CONFIG_SERIAL_MULTI
serial_initialize();
#endif
+
+#ifndef CONFIG_SYS_NO_FLASH
/* configure available FLASH banks */
size = flash_init();
display_flash_config(size);
show_boot_progress(0x24);
+#endif
show_boot_progress(0x25);