diff options
-rw-r--r-- | arch/m68k/include/asm/m5307sim.h | 29 | ||||
-rw-r--r-- | arch/m68k/include/asm/m532xsim.h | 29 | ||||
-rw-r--r-- | arch/m68k/include/asm/m53xxacr.h | 52 |
3 files changed, 56 insertions, 54 deletions
diff --git a/arch/m68k/include/asm/m5307sim.h b/arch/m68k/include/asm/m5307sim.h index 7003d7268ae8..0bf57397e7a9 100644 --- a/arch/m68k/include/asm/m5307sim.h +++ b/arch/m68k/include/asm/m5307sim.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #define CPU_NAME "COLDFIRE(m5307)" | 17 | #define CPU_NAME "COLDFIRE(m5307)" |
18 | #define CPU_INSTR_PER_JIFFY 3 | 18 | #define CPU_INSTR_PER_JIFFY 3 |
19 | 19 | ||
20 | #include <asm/m53xxacr.h> | ||
21 | |||
20 | /* | 22 | /* |
21 | * Define the 5307 SIM register set addresses. | 23 | * Define the 5307 SIM register set addresses. |
22 | */ | 24 | */ |
@@ -160,32 +162,5 @@ | |||
160 | #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ | 162 | #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ |
161 | #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ | 163 | #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ |
162 | 164 | ||
163 | /* | ||
164 | * Define the Cache register flags. | ||
165 | */ | ||
166 | #define CACR_EC (1<<31) | ||
167 | #define CACR_ESB (1<<29) | ||
168 | #define CACR_DPI (1<<28) | ||
169 | #define CACR_HLCK (1<<27) | ||
170 | #define CACR_CINVA (1<<24) | ||
171 | #define CACR_DNFB (1<<10) | ||
172 | #define CACR_DCM_WTHRU (0<<8) | ||
173 | #define CACR_DCM_WBACK (1<<8) | ||
174 | #define CACR_DCM_OFF_PRE (2<<8) | ||
175 | #define CACR_DCM_OFF_IMP (3<<8) | ||
176 | #define CACR_DW (1<<5) | ||
177 | |||
178 | #define ACR_BASE_POS 24 | ||
179 | #define ACR_MASK_POS 16 | ||
180 | #define ACR_ENABLE (1<<15) | ||
181 | #define ACR_USER (0<<13) | ||
182 | #define ACR_SUPER (1<<13) | ||
183 | #define ACR_ANY (2<<13) | ||
184 | #define ACR_CM_WTHRU (0<<5) | ||
185 | #define ACR_CM_WBACK (1<<5) | ||
186 | #define ACR_CM_OFF_PRE (2<<5) | ||
187 | #define ACR_CM_OFF_IMP (3<<5) | ||
188 | #define ACR_WPROTECT (1<<2) | ||
189 | |||
190 | /****************************************************************************/ | 165 | /****************************************************************************/ |
191 | #endif /* m5307sim_h */ | 166 | #endif /* m5307sim_h */ |
diff --git a/arch/m68k/include/asm/m532xsim.h b/arch/m68k/include/asm/m532xsim.h index 45c119c072db..e6470f8ca324 100644 --- a/arch/m68k/include/asm/m532xsim.h +++ b/arch/m68k/include/asm/m532xsim.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #define CPU_NAME "COLDFIRE(m532x)" | 12 | #define CPU_NAME "COLDFIRE(m532x)" |
13 | #define CPU_INSTR_PER_JIFFY 3 | 13 | #define CPU_INSTR_PER_JIFFY 3 |
14 | 14 | ||
15 | #include <asm/m53xxacr.h> | ||
16 | |||
15 | #define MCF_REG32(x) (*(volatile unsigned long *)(x)) | 17 | #define MCF_REG32(x) (*(volatile unsigned long *)(x)) |
16 | #define MCF_REG16(x) (*(volatile unsigned short *)(x)) | 18 | #define MCF_REG16(x) (*(volatile unsigned short *)(x)) |
17 | #define MCF_REG08(x) (*(volatile unsigned char *)(x)) | 19 | #define MCF_REG08(x) (*(volatile unsigned char *)(x)) |
@@ -77,33 +79,6 @@ | |||
77 | #define MCF_IRQ_PROFILER (64 + 33) /* Timer1 */ | 79 | #define MCF_IRQ_PROFILER (64 + 33) /* Timer1 */ |
78 | 80 | ||
79 | /* | 81 | /* |
80 | * Define the Cache register flags. | ||
81 | */ | ||
82 | #define CACR_EC (1<<31) | ||
83 | #define CACR_ESB (1<<29) | ||
84 | #define CACR_DPI (1<<28) | ||
85 | #define CACR_HLCK (1<<27) | ||
86 | #define CACR_CINVA (1<<24) | ||
87 | #define CACR_DNFB (1<<10) | ||
88 | #define CACR_DCM_WTHRU (0<<8) | ||
89 | #define CACR_DCM_WBACK (1<<8) | ||
90 | #define CACR_DCM_OFF_PRE (2<<8) | ||
91 | #define CACR_DCM_OFF_IMP (3<<8) | ||
92 | #define CACR_DW (1<<5) | ||
93 | |||
94 | #define ACR_BASE_POS 24 | ||
95 | #define ACR_MASK_POS 16 | ||
96 | #define ACR_ENABLE (1<<15) | ||
97 | #define ACR_USER (0<<13) | ||
98 | #define ACR_SUPER (1<<13) | ||
99 | #define ACR_ANY (2<<13) | ||
100 | #define ACR_CM_WTHRU (0<<5) | ||
101 | #define ACR_CM_WBACK (1<<5) | ||
102 | #define ACR_CM_OFF_PRE (2<<5) | ||
103 | #define ACR_CM_OFF_IMP (3<<5) | ||
104 | #define ACR_WPROTECT (1<<2) | ||
105 | |||
106 | /* | ||
107 | * UART module. | 82 | * UART module. |
108 | */ | 83 | */ |
109 | #define MCFUART_BASE1 0xFC060000 /* Base address of UART1 */ | 84 | #define MCFUART_BASE1 0xFC060000 /* Base address of UART1 */ |
diff --git a/arch/m68k/include/asm/m53xxacr.h b/arch/m68k/include/asm/m53xxacr.h new file mode 100644 index 000000000000..532fbb91185f --- /dev/null +++ b/arch/m68k/include/asm/m53xxacr.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /****************************************************************************/ | ||
2 | |||
3 | /* | ||
4 | * m53xxacr.h -- ColdFire version 3 core cache support | ||
5 | * | ||
6 | * (C) Copyright 2010, Greg Ungerer <gerg@snapgear.com> | ||
7 | */ | ||
8 | |||
9 | /****************************************************************************/ | ||
10 | #ifndef m53xxacr_h | ||
11 | #define m53xxacr_h | ||
12 | /****************************************************************************/ | ||
13 | |||
14 | /* | ||
15 | * All varients of the ColdFire using version 3 cores have a similar | ||
16 | * cache setup. They have a unified instruction and data cache, with | ||
17 | * configurable write-through or copy-back operation. | ||
18 | */ | ||
19 | |||
20 | /* | ||
21 | * Define the Cache Control register flags. | ||
22 | */ | ||
23 | #define CACR_EC 0x80000000 /* Enable cache */ | ||
24 | #define CACR_ESB 0x20000000 /* Enable store buffer */ | ||
25 | #define CACR_DPI 0x10000000 /* Disable invalidation by CPUSHL */ | ||
26 | #define CACR_HLCK 0x08000000 /* Half cache lock mode */ | ||
27 | #define CACR_CINVA 0x01000000 /* Invalidate cache */ | ||
28 | #define CACR_DNFB 0x00000400 /* Inhibited fill buffer */ | ||
29 | #define CACR_DCM_WT 0x00000000 /* Cacheable write-through */ | ||
30 | #define CACR_DCM_CB 0x00000100 /* Cacheable copy-back */ | ||
31 | #define CACR_DCM_PRE 0x00000200 /* Cache inhibited, precise */ | ||
32 | #define CACR_DCM_IMPRE 0x00000300 /* Cache inhibited, imprecise */ | ||
33 | #define CACR_WPROTECT 0x00000020 /* Write protect*/ | ||
34 | #define CACR_EUSP 0x00000010 /* Eanble separate user a7 */ | ||
35 | |||
36 | /* | ||
37 | * Define the Access Control register flags. | ||
38 | */ | ||
39 | #define ACR_BASE_POS 24 /* Address Base (upper 8 bits) */ | ||
40 | #define ACR_MASK_POS 16 /* Address Mask (next 8 bits) */ | ||
41 | #define ACR_ENABLE 0x00008000 /* Enable this ACR */ | ||
42 | #define ACR_USER 0x00000000 /* Allow only user accesses */ | ||
43 | #define ACR_SUPER 0x00002000 /* Allow supervisor access only */ | ||
44 | #define ACR_ANY 0x00004000 /* Allow any access type */ | ||
45 | #define ACR_CM_WT 0x00000000 /* Cacheable, write-through */ | ||
46 | #define ACR_CM_CB 0x00000020 /* Cacheable, copy-back */ | ||
47 | #define ACR_CM_PRE 0x00000040 /* Cache inhibited, precise */ | ||
48 | #define ACR_CM_IMPRE 0x00000060 /* Cache inhibited, imprecise */ | ||
49 | #define ACR_WPROTECT 0x00000004 /* Write protect region */ | ||
50 | |||
51 | /****************************************************************************/ | ||
52 | #endif /* m53xxsim_h */ | ||