summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2009-09-11 11:30:30 -0500
committerKumar Gala <galak@kernel.crashing.org>2009-09-15 21:30:09 -0500
commit206af3527c05e520e28d38a48a1d15433e34675d (patch)
tree9abb21e56d2d438ae8d8ca06d1f03620281aec9a /include
parentd30f9043539d372cf66406bc2f21bb8c20e67009 (diff)
downloadu-boot-imx-206af3527c05e520e28d38a48a1d15433e34675d.zip
u-boot-imx-206af3527c05e520e28d38a48a1d15433e34675d.tar.gz
u-boot-imx-206af3527c05e520e28d38a48a1d15433e34675d.tar.bz2
ppc/85xx: Repack tlb_table to save space
We can pack the initial tlb_table in MAS register format and use write_tlb to set things up. This savings can be helpful for NAND style first stage boot loaders. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-ppc/mmu.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h
index 8f382fd..a019d0b 100644
--- a/include/asm-ppc/mmu.h
+++ b/include/asm-ppc/mmu.h
@@ -485,19 +485,18 @@ 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 }
+ { .mas0 = FSL_BOOKE_MAS0(_tlb, _esel, 0), \
+ .mas1 = FSL_BOOKE_MAS1(1, _iprot, 0, _ts, _sz), \
+ .mas2 = FSL_BOOKE_MAS2(_epn, _wimge), \
+ .mas3 = FSL_BOOKE_MAS3(_rpn, 0, _perms), \
+ .mas7 = FSL_BOOKE_MAS7(_rpn), }
struct fsl_e_tlb_entry {
- u8 tlb;
- u32 epn;
- u64 rpn;
- u8 perms;
- u8 wimge;
- u8 ts;
- u8 esel;
- u8 tsize;
- u8 iprot;
+ u32 mas0;
+ u32 mas1;
+ u32 mas2;
+ u32 mas3;
+ u32 mas7;
};
extern struct fsl_e_tlb_entry tlb_table[];