X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=lib_ppc%2Fboard.c;h=dd22f99c67983f4585260ed0f0a31c545e87a60f;hb=c847e98b143c154cc466f9d03e90a3495329172b;hp=796d00242b1ba2ffa13e35d2cde474447422d2f1;hpb=310cecb8ccdbc8a9be580e75b2fd362179d78535;p=oweals%2Fu-boot.git diff --git a/lib_ppc/board.c b/lib_ppc/board.c index 796d00242b..dd22f99c67 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -255,14 +255,12 @@ static int init_func_watchdog_reset (void) */ init_fnc_t *init_sequence[] = { - -#if defined(CONFIG_BOARD_EARLY_INIT_F) - board_early_init_f, -#endif - #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) probecpu, #endif +#if defined(CONFIG_BOARD_EARLY_INIT_F) + board_early_init_f, +#endif #if !defined(CONFIG_8xx_CPUCLK_DEFAULT) get_clocks, /* get CPU and bus clocks (etc.) */ #if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M) \ @@ -647,6 +645,14 @@ void board_init_r (gd_t *id, ulong dest_addr) /* The Malloc area is immediately below the monitor copy in DRAM */ malloc_start = dest_addr - TOTAL_MALLOC_LEN; +#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) + /* + * The gd->cpu pointer is set to an address in flash before relocation. + * We need to update it to point to the same CPU entry in RAM. + */ + gd->cpu += dest_addr - CONFIG_SYS_MONITOR_BASE; +#endif + #ifdef CONFIG_SERIAL_MULTI serial_initialize(); #endif