void board_init_r(gd_t *new_gd, ulong dest_addr)
{
extern void malloc_bin_reloc (void);
-#ifndef CFG_ENV_IS_NOWHERE
+#ifndef CONFIG_ENV_IS_NOWHERE
extern char * env_name_spec;
#endif
+ char *s;
cmd_tbl_t *cmdtp;
bd_t *bd;
}
/* there are some other pointer constants we must deal with */
-#ifndef CFG_ENV_IS_NOWHERE
+#ifndef CONFIG_ENV_IS_NOWHERE
env_name_spec += gd->reloc_off;
#endif
malloc_bin_reloc();
dma_alloc_init();
board_init_info();
- flash_init();
+
+ enable_interrupts();
+
+ bd->bi_flashstart = 0;
+ bd->bi_flashsize = 0;
+ bd->bi_flashoffset = 0;
+
+#ifndef CFG_NO_FLASH
+ bd->bi_flashstart = CFG_FLASH_BASE;
+ bd->bi_flashsize = flash_init();
+ bd->bi_flashoffset = (unsigned long)_edata - (unsigned long)_text;
if (bd->bi_flashsize)
display_flash_config();
+#endif
+
if (bd->bi_dram[0].size)
display_dram_config();
/* initialize environment */
env_relocate();
+ bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+
devices_init();
jumptable_init();
console_init_r();
+ s = getenv("loadaddr");
+ if (s)
+ load_addr = simple_strtoul(s, NULL, 16);
+
#if defined(CONFIG_CMD_NET)
+ s = getenv("bootfile");
+ if (s)
+ copy_filename(BootFile, s, sizeof(BootFile));
#if defined(CONFIG_NET_MULTI)
puts("Net: ");
#endif