2 * Definitions for Coldfire V4e MMU
6 #ifndef __M68K_MCFMMU_H
7 #define __M68K_MCFMMU_H
10 #define MMU_BASE 0xE1000000
13 #define MMUCR (MMU_BASE+0x00)
15 #define MMUCR_ASM (1<<MMUCR_ASMN)
17 #define MMUCR_EN (1<<MMUCR_ENN)
19 #define MMUOR REG16(MMU_BASE+0x04+0x02)
21 #define MMUOR_AA (0xffff<<MMUOR_AAN)
23 #define MMUOR_STLB (1<<MMUOR_STLBN)
25 #define MMUOR_CA (1<<MMUOR_CAN)
27 #define MMUOR_CNL (1<<MMUOR_CNLN)
29 #define MMUOR_CAS (1<<MMUOR_CASN)
31 #define MMUOR_ITLB (1<<MMUOR_ITLBN)
33 #define MMUOR_ADR (1<<MMUOR_ADRN)
35 #define MMUOR_RW (1<<MMUOR_RWN)
37 #define MMUOR_ACC (1<<MMUOR_ACCN)
39 #define MMUOR_UAA (1<<MMUOR_UAAN)
41 #define MMUSR REG32(MMU_BASE+0x08)
43 #define MMUSR_SPF (1<<MMUSR_SPFN)
45 #define MMUSR_RF (1<<MMUSR_RFN)
47 #define MMUSR_WF (1<<MMUSR_WFN)
49 #define MMUSR_HIT (1<<MMUSR_HITN)
51 #define MMUAR REG32(MMU_BASE+0x10)
53 #define MMUAR_VP (0xfffffffe)
55 #define MMUAR_S (1<<MMUAR_SN)
57 #define MMUTR REG32(MMU_BASE+0x14)
59 #define MMUTR_VA (0xfffffc00)
61 #define MMUTR_ID (0xff<<MMUTR_IDN)
63 #define MMUTR_SG (1<<MMUTR_SGN)
65 #define MMUTR_V (1<<MMUTR_VN)
67 #define MMUDR REG32(MMU_BASE+0x18)
69 #define MMUDR_PA (0xfffffc00)
71 #define MMUDR_SZ_MASK (0x2<<MMUDR_SZN)
72 #define MMUDR_SZ1M (0<<MMUDR_SZN)
73 #define MMUDR_SZ4K (1<<MMUDR_SZN)
74 #define MMUDR_SZ8K (2<<MMUDR_SZN)
75 #define MMUDR_SZ16M (3<<MMUDR_SZN)
77 #define MMUDR_INC (2<<MMUDR_CMN)
78 #define MMUDR_IC (0<<MMUDR_CMN)
79 #define MMUDR_DWT (0<<MMUDR_CMN)
80 #define MMUDR_DCB (1<<MMUDR_CMN)
81 #define MMUDR_DNCP (2<<MMUDR_CMN)
82 #define MMUDR_DNCIP (3<<MMUDR_CMN)
84 #define MMUDR_SP (1<<MMUDR_SPN)
86 #define MMUDR_R (1<<MMUDR_RN)
88 #define MMUDR_W (1<<MMUDR_WN)
90 #define MMUDR_X (1<<MMUDR_XN)
92 #define MMUDR_LK (1<<MMUDR_LKN)
96 #define CF_PMEGS_NUM 256
97 #define CF_INVALID_CONTEXT 255
98 #define CF_PAGE_PGNUM_MASK (PAGE_MASK)
100 extern int cf_tlb_miss(struct pt_regs *regs, int write, int dtlb,
102 #endif /* __ASSEMBLY__*/
104 #endif /* !__M68K_MCFMMU_H */