microblaze: Change initialization sequence
env_relocation should be called first. Added stdio_init too. Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
parent
e6177b36b8
commit
9769b73f60
|
@ -30,6 +30,7 @@
|
||||||
#include <timestamp.h>
|
#include <timestamp.h>
|
||||||
#include <version.h>
|
#include <version.h>
|
||||||
#include <watchdog.h>
|
#include <watchdog.h>
|
||||||
|
#include <stdio_dev.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
@ -88,6 +89,7 @@ void board_init (void)
|
||||||
bd_t *bd;
|
bd_t *bd;
|
||||||
init_fnc_t **init_fnc_ptr;
|
init_fnc_t **init_fnc_ptr;
|
||||||
gd = (gd_t *) CONFIG_SYS_GBL_DATA_OFFSET;
|
gd = (gd_t *) CONFIG_SYS_GBL_DATA_OFFSET;
|
||||||
|
char *s;
|
||||||
#if defined(CONFIG_CMD_FLASH)
|
#if defined(CONFIG_CMD_FLASH)
|
||||||
ulong flash_size = 0;
|
ulong flash_size = 0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -151,15 +153,22 @@ void board_init (void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* relocate environment function pointers etc. */
|
||||||
|
env_relocate ();
|
||||||
|
|
||||||
|
/* Initialize stdio devices */
|
||||||
|
stdio_init ();
|
||||||
|
|
||||||
|
if ((s = getenv ("loadaddr")) != NULL) {
|
||||||
|
load_addr = simple_strtoul (s, NULL, 16);
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_NET)
|
#if defined(CONFIG_CMD_NET)
|
||||||
/* IP Address */
|
/* IP Address */
|
||||||
bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
|
bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
|
||||||
eth_init (bd);
|
eth_init (bd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* relocate environment function pointers etc. */
|
|
||||||
env_relocate ();
|
|
||||||
|
|
||||||
/* main_loop */
|
/* main_loop */
|
||||||
for (;;) {
|
for (;;) {
|
||||||
WATCHDOG_RESET ();
|
WATCHDOG_RESET ();
|
||||||
|
|
Loading…
Reference in New Issue