From dc2adad85bf580d65916c940683f6e9671e8a5dd Mon Sep 17 00:00:00 2001 From: Dave Liu Date: Tue, 28 Oct 2008 17:46:12 +0800 Subject: 86xx: Move the clear_tlbs before MMU turn on 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 Acked-by: Becky Bruce --- cpu/mpc86xx/start.S | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cpu') diff --git a/cpu/mpc86xx/start.S b/cpu/mpc86xx/start.S index 159f3e1743..30e60477c5 100644 --- a/cpu/mpc86xx/start.S +++ b/cpu/mpc86xx/start.S @@ -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) -- cgit From bd888e9544419665334a6f47f81f34011cea38f3 Mon Sep 17 00:00:00 2001 From: Dave Liu Date: Tue, 28 Oct 2008 17:47:41 +0800 Subject: 86xx: remove the unused code for 86xx family I believe these code was copied from 74xx family, but for 86xx, it is unused. Signed-off-by: Dave Liu Acked-by: Kumar Gala --- cpu/mpc86xx/start.S | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'cpu') diff --git a/cpu/mpc86xx/start.S b/cpu/mpc86xx/start.S index 30e60477c5..ab672d1d99 100644 --- a/cpu/mpc86xx/start.S +++ b/cpu/mpc86xx/start.S @@ -647,16 +647,6 @@ relocate_code: /* * Now relocate code */ -#ifdef CONFIG_ECC - bl board_relocate_rom - sync - mr r3, r10 /* Destination Address */ - lis r4, CONFIG_SYS_MONITOR_BASE@h /* Source Address */ - ori r4, r4, CONFIG_SYS_MONITOR_BASE@l - lwz r5, GOT(__init_end) - sub r5, r5, r4 - li r6, CONFIG_SYS_CACHELINE_SIZE /* Cache Line Size */ -#else cmplw cr1,r3,r4 addi r0,r5,3 srwi. r0,r0,2 @@ -678,7 +668,6 @@ relocate_code: 3: lwzu r0,-4(r8) stwu r0,-4(r7) bdnz 3b -#endif /* * Now flush the cache: note that we must start from a cache aligned * address. Otherwise we might miss one cache line. @@ -711,9 +700,6 @@ relocate_code: blr in_ram: -#ifdef CONFIG_ECC - bl board_init_ecc -#endif /* * Relocation Function, r14 point to got2+0x8000 * -- cgit From eaa44c5dc83756c3067b9e6c9db626facd0b0660 Mon Sep 17 00:00:00 2001 From: Dave Liu Date: Tue, 28 Oct 2008 17:47:49 +0800 Subject: 86xx: remove the redundant r2 global data pointer save The commit 67256678f00c09b0a7f19e862e5c1847553d31bc add the another global data pointer save, but in fact the global data pointer will be initialized in the board_init_r, so remove it such as the 85xx/83xx family. Signed-off-by: Dave Liu Acked-by: Kumar Gala --- cpu/mpc86xx/start.S | 1 - 1 file changed, 1 deletion(-) (limited to 'cpu') diff --git a/cpu/mpc86xx/start.S b/cpu/mpc86xx/start.S index ab672d1d99..75e431764b 100644 --- a/cpu/mpc86xx/start.S +++ b/cpu/mpc86xx/start.S @@ -620,7 +620,6 @@ relocate_code: mr r1, r3 /* Set new stack pointer */ mr r9, r4 /* Save copy of Global Data pointer */ - mr r2, r9 /* Save for DECLARE_GLOBAL_DATA_PTR */ mr r10, r5 /* Save copy of Destination Address */ mr r3, r5 /* Destination Address */ -- cgit