diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2009-09-11 11:27:00 -0500 |
---|---|---|
committer | Tom Rix <Tom.Rix@windriver.com> | 2009-10-03 09:04:28 -0500 |
commit | ccea800346cbf4f5217dbd37256bf7ae21162473 (patch) | |
tree | 74a5a20cf4f0ab88b520c23aaced7e5788d58df6 /cpu/mpc85xx/start.S | |
parent | 0fb37e5733c27164d5feae4cffba211c6f4d8390 (diff) |
ppc/85xx: Introduce low level write_tlb function
Factor out the code we use to actually write a tlb entry.
set_tlb is a logical view of the TLB while write_tlb is a low level
matching the MAS registers.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'cpu/mpc85xx/start.S')
-rw-r--r-- | cpu/mpc85xx/start.S | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/cpu/mpc85xx/start.S b/cpu/mpc85xx/start.S index 7a23b4f811..eeee7a9764 100644 --- a/cpu/mpc85xx/start.S +++ b/cpu/mpc85xx/start.S @@ -1,5 +1,5 @@ /* - * Copyright 2004, 2007 Freescale Semiconductor. + * Copyright 2004, 2007-2009 Freescale Semiconductor. * Copyright (C) 2003 Motorola,Inc. * * See file CREDITS for list of people who contributed to this @@ -821,6 +821,28 @@ in32r: /*------------------------------------------------------------------------------*/ /* + * void write_tlb(mas0, mas1, mas2, mas3, mas7) + */ + .globl write_tlb +write_tlb: + mtspr MAS0,r3 + mtspr MAS1,r4 + mtspr MAS2,r5 + mtspr MAS3,r6 +#ifdef CONFIG_ENABLE_36BIT_PHYS + mtspr MAS7,r7 +#endif + li r3,0 +#ifdef CONFIG_SYS_BOOK3E_HV + mtspr MAS8,r3 +#endif + isync + tlbwe + msync + isync + blr + +/* * void relocate_code (addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM |