summaryrefslogtreecommitdiff
path: root/include/e500.h
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2007-12-18 23:21:51 -0600
committerAndrew Fleming-AFLEMING <afleming@freescale.com>2008-01-09 16:25:03 -0600
commit1d47273d46925929f8f2c1913cd96d7257aade88 (patch)
tree0330104801b49c1ff7fbc7abaffe85adb2e3f866 /include/e500.h
parentcc557950f742fe18003638963e267d52036159ce (diff)
downloadu-boot-imx-1d47273d46925929f8f2c1913cd96d7257aade88.zip
u-boot-imx-1d47273d46925929f8f2c1913cd96d7257aade88.tar.gz
u-boot-imx-1d47273d46925929f8f2c1913cd96d7257aade88.tar.bz2
Use FSL Book-E MMU macros from Linux Kernel
Grab the FSL Book-E MAS register macros from Linux. Also added defines for page sizes up to 4TB and removed SHAREN since it doesnt really exist. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'include/e500.h')
-rw-r--r--include/e500.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/e500.h b/include/e500.h
index 0d73260..983826d 100644
--- a/include/e500.h
+++ b/include/e500.h
@@ -50,10 +50,7 @@ typedef struct
* nv(Next victim):0,1
*/
#define TLB1_MAS0(tlbsel,esel,nv) \
- ((((tlbsel) << 28) & MAS0_TLBSEL) |\
- (((esel) << 16) & MAS0_ESEL ) |\
- (nv) )
-
+ (MAS0_TLBSEL(tlbsel) | MAS0_ESEL(esel) | MAS0_NV(nv))
/* MAS1
* v(TLB valid bit):0,1
@@ -65,10 +62,9 @@ typedef struct
#define TLB1_MAS1(v,iprot,tid,ts,tsize) \
((((v) << 31) & MAS1_VALID) |\
(((iprot) << 30) & MAS1_IPROT) |\
- (((tid) << 16) & MAS1_TID) |\
+ (MAS1_TID(tid)) |\
(((ts) << 12) & MAS1_TS) |\
- (((tsize) << 8) & MAS1_TSIZE) )
-
+ (MAS1_TSIZE(tsize)))
/* MAS2
* epn(effective page number):20bits
@@ -79,7 +75,6 @@ typedef struct
*/
#define TLB1_MAS2(epn,sharen,x0,x1,w,i,m,g,e) \
((((epn) << 12) & MAS2_EPN) |\
- (((sharen) << 9) & MAS2_SHAREN) |\
(((x0) << 6) & MAS2_X0) |\
(((x1) << 5) & MAS2_X1) |\
(((w) << 4) & MAS2_W) |\
@@ -88,7 +83,6 @@ typedef struct
(((g) << 1) & MAS2_G) |\
(e) )
-
/* MAS3
* rpn(real page number):20bits
* u0-u3(user bits, useful for page table management in OS):0,1