86xx: Move the clear_tlbs before MMU turn on
authorDave Liu <daveliu@freescale.com>
Tue, 28 Oct 2008 09:46:12 +0000 (17:46 +0800)
committerJon Loeliger <jdl@freescale.com>
Thu, 30 Oct 2008 15:26:37 +0000 (10:26 -0500)
We must invalidate TLBs before MMU turn on, but
currently the code is not, if there are some stale
TLB entry valid in the TLBs, it will cause strange
issue.

Signed-off-by: Dave Liu <daveliu@freescale.com>
Acked-by: Becky Bruce <becky.bruce@freescale.com>
cpu/mpc86xx/start.S

index 159f3e1..30e6047 100644 (file)
@@ -202,8 +202,12 @@ boot_warm:
        mtmsr   0
 #endif
 
+       /* Invalidate BATs */
        bl      invalidate_bats
        sync
+       /* Invalidate all of TLB before MMU turn on */
+       bl      clear_tlbs
+       sync
 
 #ifdef CONFIG_SYS_L2
        /* init the L2 cache */
@@ -275,7 +279,6 @@ in_flash:
 
        /* setup the rest of the bats */
        bl      setup_bats
-       bl      clear_tlbs
        sync
 
 #if (CONFIG_SYS_CCSRBAR_DEFAULT != CONFIG_SYS_CCSRBAR)