From: Becky Bruce Date: Wed, 5 Nov 2008 20:55:30 +0000 (-0600) Subject: mpc86xx: Move setup_bats into cpu_init_f X-Git-Tag: v2009.01-rc1~72^2~11 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=24bfb48c35fed6ad1f047e3e4a27df302482cd93;p=oweals%2Fu-boot.git mpc86xx: Move setup_bats into cpu_init_f In order to later allow for a physical relocation of the flash, setup_bats, which sets up the final BAT mapping for the board, needs to happen *after* init_laws(). Otherwise, there will be no window programmed for the flash at the new physical location at the point when we change the mmu translation. Signed-off-by: Becky Bruce --- diff --git a/cpu/mpc86xx/cpu_init.c b/cpu/mpc86xx/cpu_init.c index 06f179c093..a7e6036dbe 100644 --- a/cpu/mpc86xx/cpu_init.c +++ b/cpu/mpc86xx/cpu_init.c @@ -33,6 +33,8 @@ #include #include "mp.h" +void setup_bats(void); + DECLARE_GLOBAL_DATA_PTR; /* @@ -57,6 +59,8 @@ void cpu_init_f(void) init_laws(); #endif + setup_bats(); + /* Map banks 0 and 1 to the FLASH banks 0 and 1 at preliminary * addresses - these have to be modified later when FLASH size * has been determined diff --git a/cpu/mpc86xx/start.S b/cpu/mpc86xx/start.S index 48f8c5acf5..0d30e91b61 100644 --- a/cpu/mpc86xx/start.S +++ b/cpu/mpc86xx/start.S @@ -272,11 +272,6 @@ in_flash: GET_GOT /* initialize GOT access */ - /* setup the rest of the bats */ - bl setup_bats - sync - - /* run low-level CPU init code (from Flash) */ bl cpu_init_f sync