]> rtime.felk.cvut.cz Git - mcf548x/linux.git/blob - arch/m68k/include/asm/mcfmmu.h
Headers cleanup
[mcf548x/linux.git] / arch / m68k / include / asm / mcfmmu.h
1 /*
2  * Definitions for Coldfire V4e MMU
3  */
4 #include <asm/movs.h>
5
6 #ifndef __M68K_MCFMMU_H
7 #define __M68K_MCFMMU_H
8
9
10 #define MMU_BASE 0xE1000000
11
12
13 #define MMUCR (MMU_BASE+0x00)
14 #define MMUCR_ASMN  1
15 #define MMUCR_ASM   (1<<MMUCR_ASMN)
16 #define MMUCR_ENN   0
17 #define MMUCR_EN    (1<<MMUCR_ENN)
18
19 #define MMUOR REG16(MMU_BASE+0x04+0x02)
20 #define MMUOR_AAN   16
21 #define MMUOR_AA    (0xffff<<MMUOR_AAN)
22 #define MMUOR_STLBN 8
23 #define MMUOR_STLB  (1<<MMUOR_STLBN)
24 #define MMUOR_CAN   7
25 #define MMUOR_CA    (1<<MMUOR_CAN)
26 #define MMUOR_CNLN  6
27 #define MMUOR_CNL   (1<<MMUOR_CNLN)
28 #define MMUOR_CASN  5
29 #define MMUOR_CAS   (1<<MMUOR_CASN)
30 #define MMUOR_ITLBN 4
31 #define MMUOR_ITLB  (1<<MMUOR_ITLBN)
32 #define MMUOR_ADRN  3
33 #define MMUOR_ADR   (1<<MMUOR_ADRN)
34 #define MMUOR_RWN   2
35 #define MMUOR_RW    (1<<MMUOR_RWN)
36 #define MMUOR_ACCN  1
37 #define MMUOR_ACC   (1<<MMUOR_ACCN)
38 #define MMUOR_UAAN  0
39 #define MMUOR_UAA   (1<<MMUOR_UAAN)
40
41 #define MMUSR REG32(MMU_BASE+0x08)
42 #define MMUSR_SPFN  5
43 #define MMUSR_SPF   (1<<MMUSR_SPFN)
44 #define MMUSR_RFN   4
45 #define MMUSR_RF    (1<<MMUSR_RFN)
46 #define MMUSR_WFN   3
47 #define MMUSR_WF    (1<<MMUSR_WFN)
48 #define MMUSR_HITN  1
49 #define MMUSR_HIT   (1<<MMUSR_HITN)
50
51 #define MMUAR REG32(MMU_BASE+0x10)
52 #define MMUAR_VPN   1
53 #define MMUAR_VP    (0xfffffffe)
54 #define MMUAR_SN    0
55 #define MMUAR_S     (1<<MMUAR_SN)
56
57 #define MMUTR REG32(MMU_BASE+0x14)
58 #define MMUTR_VAN   10
59 #define MMUTR_VA    (0xfffffc00)
60 #define MMUTR_IDN   2
61 #define MMUTR_ID    (0xff<<MMUTR_IDN)
62 #define MMUTR_SGN   1
63 #define MMUTR_SG    (1<<MMUTR_SGN)
64 #define MMUTR_VN    0
65 #define MMUTR_V     (1<<MMUTR_VN)
66
67 #define MMUDR REG32(MMU_BASE+0x18)
68 #define MMUDR_PAN   10
69 #define MMUDR_PA    (0xfffffc00)
70 #define MMUDR_SZN   8
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)
76 #define MMUDR_CMN   6
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)
83 #define MMUDR_SPN   5
84 #define MMUDR_SP    (1<<MMUDR_SPN)
85 #define MMUDR_RN    4
86 #define MMUDR_R     (1<<MMUDR_RN)
87 #define MMUDR_WN    3
88 #define MMUDR_W     (1<<MMUDR_WN)
89 #define MMUDR_XN    2
90 #define MMUDR_X     (1<<MMUDR_XN)
91 #define MMUDR_LKN   1
92 #define MMUDR_LK    (1<<MMUDR_LKN)
93
94
95 #ifndef __ASSEMBLY__
96 #define CF_PMEGS_NUM            256
97 #define CF_INVALID_CONTEXT      255
98 #define CF_PAGE_PGNUM_MASK      (PAGE_MASK)
99
100 extern int cf_tlb_miss(struct pt_regs *regs, int write, int dtlb,
101                        int extension_word);
102 #endif /* __ASSEMBLY__*/
103
104 #endif  /* !__M68K_MCFMMU_H */