summaryrefslogtreecommitdiffstats
path: root/include/asm-ppc/mmu.h
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2009-09-11 11:27:00 -0500
committerKumar Gala <galak@kernel.crashing.org>2009-09-15 21:30:08 -0500
commitd30f9043539d372cf66406bc2f21bb8c20e67009 (patch)
tree26e9fb3b3e4225618395e39f49a378d35f9f409b /include/asm-ppc/mmu.h
parent0ead6f2ed7cf4e1f70dab5b529ad121e38359485 (diff)
downloadtalos-obmc-uboot-d30f9043539d372cf66406bc2f21bb8c20e67009.tar.gz
talos-obmc-uboot-d30f9043539d372cf66406bc2f21bb8c20e67009.zip
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 'include/asm-ppc/mmu.h')
-rw-r--r--include/asm-ppc/mmu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h
index eda2959b7d..8f382fd6ff 100644
--- a/include/asm-ppc/mmu.h
+++ b/include/asm-ppc/mmu.h
@@ -450,6 +450,8 @@ extern void print_bats(void);
(((epn) & MAS3_RPN) | (wimge))
#define FSL_BOOKE_MAS3(rpn, user, perms) \
(((rpn) & MAS3_RPN) | (user) | (perms))
+#define FSL_BOOKE_MAS7(rpn) \
+ (((u64)(rpn)) >> 32)
#define BOOKE_PAGESZ_1K 0
#define BOOKE_PAGESZ_4K 1
@@ -480,6 +482,8 @@ extern int find_tlb_idx(void *addr, u8 tlbsel);
extern unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg);
+extern void write_tlb(u32 _mas0, u32 _mas1, u32 _mas2, u32 _mas3, u32 _mas7);
+
#define SET_TLB_ENTRY(_tlb, _epn, _rpn, _perms, _wimge, _ts, _esel, _sz, _iprot) \
{ .tlb = _tlb, .epn = _epn, .rpn = _rpn, .perms = _perms, \
.wimge = _wimge, .ts = _ts, .esel = _esel, .tsize = _sz, .iprot = _iprot }
OpenPOWER on IntegriCloud