summaryrefslogtreecommitdiffstats
path: root/cpu/mpc85xx
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-11-24 10:29:25 -0600
committerAndrew Fleming-AFLEMING <afleming@freescale.com>2008-12-04 03:15:43 -0600
commitaed461af81012a398a205e9be67ab37667491838 (patch)
treea78af3a6e255c9df76970a8257d5c3968bc77462 /cpu/mpc85xx
parentea154a1781135d822eedee7567cc156089eae93c (diff)
downloadtalos-obmc-uboot-aed461af81012a398a205e9be67ab37667491838.tar.gz
talos-obmc-uboot-aed461af81012a398a205e9be67ab37667491838.zip
85xx: Fix relocation of CCSRBAR
If the virtual address for CCSRBAR is the same after relocation but the physical address is changing we'd end up having two TLB entries with the same VA. Instead we new us the new CCSRBAR virt address + 4k as a temp virt address to access the old CCSRBAR to relocate it. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'cpu/mpc85xx')
-rw-r--r--cpu/mpc85xx/cpu_init.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/cpu/mpc85xx/cpu_init.c b/cpu/mpc85xx/cpu_init.c
index 5862bd6ab0..2d86547c20 100644
--- a/cpu/mpc85xx/cpu_init.c
+++ b/cpu/mpc85xx/cpu_init.c
@@ -140,14 +140,15 @@ void cpu_init_early_f(void)
#if (CONFIG_SYS_CCSRBAR_DEFAULT != CONFIG_SYS_CCSRBAR_PHYS)
{
u32 temp;
+ volatile u32 *ccsr_virt =
+ (volatile u32 *)(CONFIG_SYS_CCSRBAR + 0x1000);
- set_tlb(0, CONFIG_SYS_CCSRBAR_DEFAULT, CONFIG_SYS_CCSRBAR_DEFAULT,
+ set_tlb(0, (u32)ccsr_virt, CONFIG_SYS_CCSRBAR_DEFAULT,
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
1, 1, BOOKE_PAGESZ_4K, 0);
- temp = in_be32((volatile u32 *)CONFIG_SYS_CCSRBAR_DEFAULT);
- out_be32((volatile u32 *)CONFIG_SYS_CCSRBAR_DEFAULT, CONFIG_SYS_CCSRBAR_PHYS >> 12);
-
+ temp = in_be32(ccsr_virt);
+ out_be32(ccsr_virt, CONFIG_SYS_CCSRBAR_PHYS >> 12);
temp = in_be32((volatile u32 *)CONFIG_SYS_CCSRBAR);
}
#endif
OpenPOWER on IntegriCloud