]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mpc86xx: Move setup_bats into cpu_init_f
authorBecky Bruce <becky.bruce@freescale.com>
Wed, 5 Nov 2008 20:55:30 +0000 (14:55 -0600)
committerJon Loeliger <jdl@freescale.com>
Mon, 10 Nov 2008 16:10:02 +0000 (10:10 -0600)
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 <becky.bruce@freescale.com>
cpu/mpc86xx/cpu_init.c
cpu/mpc86xx/start.S

index 06f179c0937073195012400a19245c7ef85aa7b5..a7e6036dbeca27be52de6efa4095d24b4c58365f 100644 (file)
@@ -33,6 +33,8 @@
 #include <asm/fsl_law.h>
 #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
index 48f8c5acf59b343cb3a319b598f5b5f772ae30ef..0d30e91b61c47447e76a3c00f68d69009addf178 100644 (file)
@@ -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