diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-18 11:05:20 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-18 11:05:20 -0500 |
commit | 6a7f6ec9512970874fa9fc883ea44d77d0f287c2 (patch) | |
tree | 2bce1665b5a9e81bdd95f6e34410bdf13c58350e /arch/m68knommu | |
parent | c6fa63c659b3dd121f21afe7529f505505e79b23 (diff) | |
parent | 4c65595ec506ff65c90b1d9fed17333005fa5eb5 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (25 commits)
m68knommu: fix broken setting of irq_chip and handler
m68knommu: switch to using -mcpu= flags for ColdFire targets
m68knommu: arch/m68knommu/Kconfig whitespace cleanup
m68knommu: create optimal separate instruction and data cache for ColdFire
m68knommu: support ColdFire caches that do copyback and write-through
m68knommu: support version 2 ColdFire split cache
m68knommu: make cache push code ColdFire generic
m68knommu: clean up ColdFire cache control code
m68knommu: move inclusion of ColdFire v4 cache registers
m68knommu: merge bit definitions for version 3 ColdFire cache controller
m68knommu: create bit definitions for the version 2 ColdFire cache controller
m68knommu: remove empty __iounmap() it is no used
m68knommu: remove kernel_map() code, it is not used
m68knommu: remove do_page_fault(), it is not used
m68knommu: use user stack pointer hardware on some ColdFire cores
m68knommu: remove command line printing DEBUG
m68knommu: remove fasthandler interrupt code
m68knommu: move UART addressing to part specific includes
m68knommu: fix clock rate value reported for ColdFire 54xx parts
m68knommu: move ColdFire CPU names into their headers
...
Diffstat (limited to 'arch/m68knommu')
-rw-r--r-- | arch/m68knommu/Kconfig | 98 | ||||
-rw-r--r-- | arch/m68knommu/Makefile | 14 | ||||
-rw-r--r-- | arch/m68knommu/kernel/setup.c | 72 | ||||
-rw-r--r-- | arch/m68knommu/mm/Makefile | 2 | ||||
-rw-r--r-- | arch/m68knommu/mm/fault.c | 57 | ||||
-rw-r--r-- | arch/m68knommu/mm/kmap.c | 9 | ||||
-rw-r--r-- | arch/m68knommu/mm/memory.c | 33 | ||||
-rw-r--r-- | arch/m68knommu/platform/54xx/Makefile (renamed from arch/m68knommu/platform/548x/Makefile) | 0 | ||||
-rw-r--r-- | arch/m68knommu/platform/54xx/config.c (renamed from arch/m68knommu/platform/548x/config.c) | 32 | ||||
-rw-r--r-- | arch/m68knommu/platform/68328/ints.c | 4 | ||||
-rw-r--r-- | arch/m68knommu/platform/coldfire/Makefile | 4 | ||||
-rw-r--r-- | arch/m68knommu/platform/coldfire/cache.c | 48 | ||||
-rw-r--r-- | arch/m68knommu/platform/coldfire/entry.S | 56 | ||||
-rw-r--r-- | arch/m68knommu/platform/coldfire/head.S | 26 |
14 files changed, 212 insertions, 243 deletions
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig index fa9f746cf4ae..704e7b92334c 100644 --- a/arch/m68knommu/Kconfig +++ b/arch/m68knommu/Kconfig | |||
@@ -75,6 +75,16 @@ config GENERIC_CLOCKEVENTS | |||
75 | config NO_IOPORT | 75 | config NO_IOPORT |
76 | def_bool y | 76 | def_bool y |
77 | 77 | ||
78 | config COLDFIRE_SW_A7 | ||
79 | bool | ||
80 | default n | ||
81 | |||
82 | config HAVE_CACHE_SPLIT | ||
83 | bool | ||
84 | |||
85 | config HAVE_CACHE_CB | ||
86 | bool | ||
87 | |||
78 | source "init/Kconfig" | 88 | source "init/Kconfig" |
79 | 89 | ||
80 | source "kernel/Kconfig.freezer" | 90 | source "kernel/Kconfig.freezer" |
@@ -107,69 +117,90 @@ config M68360 | |||
107 | 117 | ||
108 | config M5206 | 118 | config M5206 |
109 | bool "MCF5206" | 119 | bool "MCF5206" |
120 | select COLDFIRE_SW_A7 | ||
110 | help | 121 | help |
111 | Motorola ColdFire 5206 processor support. | 122 | Motorola ColdFire 5206 processor support. |
112 | 123 | ||
113 | config M5206e | 124 | config M5206e |
114 | bool "MCF5206e" | 125 | bool "MCF5206e" |
126 | select COLDFIRE_SW_A7 | ||
115 | help | 127 | help |
116 | Motorola ColdFire 5206e processor support. | 128 | Motorola ColdFire 5206e processor support. |
117 | 129 | ||
118 | config M520x | 130 | config M520x |
119 | bool "MCF520x" | 131 | bool "MCF520x" |
120 | select GENERIC_CLOCKEVENTS | 132 | select GENERIC_CLOCKEVENTS |
133 | select HAVE_CACHE_SPLIT | ||
121 | help | 134 | help |
122 | Freescale Coldfire 5207/5208 processor support. | 135 | Freescale Coldfire 5207/5208 processor support. |
123 | 136 | ||
124 | config M523x | 137 | config M523x |
125 | bool "MCF523x" | 138 | bool "MCF523x" |
126 | select GENERIC_CLOCKEVENTS | 139 | select GENERIC_CLOCKEVENTS |
140 | select HAVE_CACHE_SPLIT | ||
127 | help | 141 | help |
128 | Freescale Coldfire 5230/1/2/4/5 processor support | 142 | Freescale Coldfire 5230/1/2/4/5 processor support |
129 | 143 | ||
130 | config M5249 | 144 | config M5249 |
131 | bool "MCF5249" | 145 | bool "MCF5249" |
146 | select COLDFIRE_SW_A7 | ||
132 | help | 147 | help |
133 | Motorola ColdFire 5249 processor support. | 148 | Motorola ColdFire 5249 processor support. |
134 | 149 | ||
135 | config M5271 | 150 | config M5271 |
136 | bool "MCF5271" | 151 | bool "MCF5271" |
152 | select HAVE_CACHE_SPLIT | ||
137 | help | 153 | help |
138 | Freescale (Motorola) ColdFire 5270/5271 processor support. | 154 | Freescale (Motorola) ColdFire 5270/5271 processor support. |
139 | 155 | ||
140 | config M5272 | 156 | config M5272 |
141 | bool "MCF5272" | 157 | bool "MCF5272" |
158 | select COLDFIRE_SW_A7 | ||
142 | help | 159 | help |
143 | Motorola ColdFire 5272 processor support. | 160 | Motorola ColdFire 5272 processor support. |
144 | 161 | ||
145 | config M5275 | 162 | config M5275 |
146 | bool "MCF5275" | 163 | bool "MCF5275" |
164 | select HAVE_CACHE_SPLIT | ||
147 | help | 165 | help |
148 | Freescale (Motorola) ColdFire 5274/5275 processor support. | 166 | Freescale (Motorola) ColdFire 5274/5275 processor support. |
149 | 167 | ||
150 | config M528x | 168 | config M528x |
151 | bool "MCF528x" | 169 | bool "MCF528x" |
152 | select GENERIC_CLOCKEVENTS | 170 | select GENERIC_CLOCKEVENTS |
171 | select HAVE_CACHE_SPLIT | ||
153 | help | 172 | help |
154 | Motorola ColdFire 5280/5282 processor support. | 173 | Motorola ColdFire 5280/5282 processor support. |
155 | 174 | ||
156 | config M5307 | 175 | config M5307 |
157 | bool "MCF5307" | 176 | bool "MCF5307" |
177 | select COLDFIRE_SW_A7 | ||
178 | select HAVE_CACHE_CB | ||
158 | help | 179 | help |
159 | Motorola ColdFire 5307 processor support. | 180 | Motorola ColdFire 5307 processor support. |
160 | 181 | ||
161 | config M532x | 182 | config M532x |
162 | bool "MCF532x" | 183 | bool "MCF532x" |
184 | select HAVE_CACHE_CB | ||
163 | help | 185 | help |
164 | Freescale (Motorola) ColdFire 532x processor support. | 186 | Freescale (Motorola) ColdFire 532x processor support. |
165 | 187 | ||
166 | config M5407 | 188 | config M5407 |
167 | bool "MCF5407" | 189 | bool "MCF5407" |
190 | select COLDFIRE_SW_A7 | ||
191 | select HAVE_CACHE_CB | ||
168 | help | 192 | help |
169 | Motorola ColdFire 5407 processor support. | 193 | Motorola ColdFire 5407 processor support. |
170 | 194 | ||
195 | config M547x | ||
196 | bool "MCF547x" | ||
197 | select HAVE_CACHE_CB | ||
198 | help | ||
199 | Freescale ColdFire 5470/5471/5472/5473/5474/5475 processor support. | ||
200 | |||
171 | config M548x | 201 | config M548x |
172 | bool "MCF548x" | 202 | bool "MCF548x" |
203 | select HAVE_CACHE_CB | ||
173 | help | 204 | help |
174 | Freescale ColdFire 5480/5481/5482/5483/5484/5485 processor support. | 205 | Freescale ColdFire 5480/5481/5482/5483/5484/5485 processor support. |
175 | 206 | ||
@@ -181,9 +212,14 @@ config M527x | |||
181 | select GENERIC_CLOCKEVENTS | 212 | select GENERIC_CLOCKEVENTS |
182 | default y | 213 | default y |
183 | 214 | ||
215 | config M54xx | ||
216 | bool | ||
217 | depends on (M548x || M547x) | ||
218 | default y | ||
219 | |||
184 | config COLDFIRE | 220 | config COLDFIRE |
185 | bool | 221 | bool |
186 | depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407 || M548x) | 222 | depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407 || M54xx) |
187 | select GENERIC_GPIO | 223 | select GENERIC_GPIO |
188 | select ARCH_REQUIRE_GPIOLIB | 224 | select ARCH_REQUIRE_GPIOLIB |
189 | default y | 225 | default y |
@@ -230,6 +266,46 @@ config OLDMASK | |||
230 | Build support for the older revision ColdFire 5307 silicon. | 266 | Build support for the older revision ColdFire 5307 silicon. |
231 | Specifically this is the 1H55J mask revision. | 267 | Specifically this is the 1H55J mask revision. |
232 | 268 | ||
269 | if HAVE_CACHE_SPLIT | ||
270 | choice | ||
271 | prompt "Split Cache Configuration" | ||
272 | default CACHE_I | ||
273 | |||
274 | config CACHE_I | ||
275 | bool "Instruction" | ||
276 | help | ||
277 | Use all of the ColdFire CPU cache memory as an instruction cache. | ||
278 | |||
279 | config CACHE_D | ||
280 | bool "Data" | ||
281 | help | ||
282 | Use all of the ColdFire CPU cache memory as a data cache. | ||
283 | |||
284 | config CACHE_BOTH | ||
285 | bool "Both" | ||
286 | help | ||
287 | Split the ColdFire CPU cache, and use half as an instruction cache | ||
288 | and half as a data cache. | ||
289 | endchoice | ||
290 | endif | ||
291 | |||
292 | if HAVE_CACHE_CB | ||
293 | choice | ||
294 | prompt "Data cache mode" | ||
295 | default CACHE_WRITETHRU | ||
296 | |||
297 | config CACHE_WRITETHRU | ||
298 | bool "Write-through" | ||
299 | help | ||
300 | The ColdFire CPU cache is set into Write-through mode. | ||
301 | |||
302 | config CACHE_COPYBACK | ||
303 | bool "Copy-back" | ||
304 | help | ||
305 | The ColdFire CPU cache is set into Copy-back mode. | ||
306 | endchoice | ||
307 | endif | ||
308 | |||
233 | comment "Platform" | 309 | comment "Platform" |
234 | 310 | ||
235 | config PILOT3 | 311 | config PILOT3 |
@@ -245,16 +321,16 @@ config XCOPILOT_BUGS | |||
245 | Support the bugs of Xcopilot. | 321 | Support the bugs of Xcopilot. |
246 | 322 | ||
247 | config UC5272 | 323 | config UC5272 |
248 | bool 'Arcturus Networks uC5272 dimm board support' | 324 | bool 'Arcturus Networks uC5272 dimm board support' |
249 | depends on M5272 | 325 | depends on M5272 |
250 | help | 326 | help |
251 | Support for the Arcturus Networks uC5272 dimm board. | 327 | Support for the Arcturus Networks uC5272 dimm board. |
252 | 328 | ||
253 | config UC5282 | 329 | config UC5282 |
254 | bool "Arcturus Networks uC5282 board support" | 330 | bool "Arcturus Networks uC5282 board support" |
255 | depends on M528x | 331 | depends on M528x |
256 | help | 332 | help |
257 | Support for the Arcturus Networks uC5282 dimm board. | 333 | Support for the Arcturus Networks uC5282 dimm board. |
258 | 334 | ||
259 | config UCSIMM | 335 | config UCSIMM |
260 | bool "uCsimm module support" | 336 | bool "uCsimm module support" |
@@ -279,7 +355,7 @@ config DIRECT_IO_ACCESS | |||
279 | depends on (UCSIMM || UCDIMM || DRAGEN2) | 355 | depends on (UCSIMM || UCDIMM || DRAGEN2) |
280 | help | 356 | help |
281 | Disable the CPU internal registers protection in user mode, | 357 | Disable the CPU internal registers protection in user mode, |
282 | to allow a user application to read/write them. | 358 | to allow a user application to read/write them. |
283 | 359 | ||
284 | config INIT_LCD | 360 | config INIT_LCD |
285 | bool "Initialize LCD" | 361 | bool "Initialize LCD" |
@@ -517,7 +593,7 @@ config EMAC_INC | |||
517 | depends on (SOM5282EM) | 593 | depends on (SOM5282EM) |
518 | 594 | ||
519 | config SNEHA | 595 | config SNEHA |
520 | bool | 596 | bool |
521 | default y | 597 | default y |
522 | depends on CPU16B | 598 | depends on CPU16B |
523 | 599 | ||
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile index 026ef16fa68e..589613fed31d 100644 --- a/arch/m68knommu/Makefile +++ b/arch/m68knommu/Makefile | |||
@@ -25,7 +25,7 @@ platform-$(CONFIG_M528x) := 528x | |||
25 | platform-$(CONFIG_M5307) := 5307 | 25 | platform-$(CONFIG_M5307) := 5307 |
26 | platform-$(CONFIG_M532x) := 532x | 26 | platform-$(CONFIG_M532x) := 532x |
27 | platform-$(CONFIG_M5407) := 5407 | 27 | platform-$(CONFIG_M5407) := 5407 |
28 | platform-$(CONFIG_M548x) := 548x | 28 | platform-$(CONFIG_M54xx) := 54xx |
29 | PLATFORM := $(platform-y) | 29 | PLATFORM := $(platform-y) |
30 | 30 | ||
31 | board-$(CONFIG_PILOT) := pilot | 31 | board-$(CONFIG_PILOT) := pilot |
@@ -74,7 +74,7 @@ cpuclass-$(CONFIG_M528x) := coldfire | |||
74 | cpuclass-$(CONFIG_M5307) := coldfire | 74 | cpuclass-$(CONFIG_M5307) := coldfire |
75 | cpuclass-$(CONFIG_M532x) := coldfire | 75 | cpuclass-$(CONFIG_M532x) := coldfire |
76 | cpuclass-$(CONFIG_M5407) := coldfire | 76 | cpuclass-$(CONFIG_M5407) := coldfire |
77 | cpuclass-$(CONFIG_M548x) := coldfire | 77 | cpuclass-$(CONFIG_M54xx) := coldfire |
78 | cpuclass-$(CONFIG_M68328) := 68328 | 78 | cpuclass-$(CONFIG_M68328) := 68328 |
79 | cpuclass-$(CONFIG_M68EZ328) := 68328 | 79 | cpuclass-$(CONFIG_M68EZ328) := 68328 |
80 | cpuclass-$(CONFIG_M68VZ328) := 68328 | 80 | cpuclass-$(CONFIG_M68VZ328) := 68328 |
@@ -91,18 +91,18 @@ export PLATFORM BOARD MODEL CPUCLASS | |||
91 | # Some CFLAG additions based on specific CPU type. | 91 | # Some CFLAG additions based on specific CPU type. |
92 | # | 92 | # |
93 | cflags-$(CONFIG_M5206) := $(call cc-option,-mcpu=5206,-m5200) | 93 | cflags-$(CONFIG_M5206) := $(call cc-option,-mcpu=5206,-m5200) |
94 | cflags-$(CONFIG_M5206e) := $(call cc-option,-m5206e,-m5200) | 94 | cflags-$(CONFIG_M5206e) := $(call cc-option,-mcpu=5206e,-m5200) |
95 | cflags-$(CONFIG_M520x) := $(call cc-option,-mcpu=5208,-m5200) | 95 | cflags-$(CONFIG_M520x) := $(call cc-option,-mcpu=5208,-m5200) |
96 | cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307) | 96 | cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307) |
97 | cflags-$(CONFIG_M5249) := $(call cc-option,-mcpu=5249,-m5200) | 97 | cflags-$(CONFIG_M5249) := $(call cc-option,-mcpu=5249,-m5200) |
98 | cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307) | 98 | cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307) |
99 | cflags-$(CONFIG_M5272) := $(call cc-option,-mcpu=5272,-m5307) | 99 | cflags-$(CONFIG_M5272) := $(call cc-option,-mcpu=5272,-m5307) |
100 | cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307) | 100 | cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307) |
101 | cflags-$(CONFIG_M528x) := $(call cc-option,-m528x,-m5307) | 101 | cflags-$(CONFIG_M528x) := $(call cc-option,-mcpu=528x,-m5307) |
102 | cflags-$(CONFIG_M5307) := $(call cc-option,-m5307,-m5200) | 102 | cflags-$(CONFIG_M5307) := $(call cc-option,-mcpu=5307,-m5200) |
103 | cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307) | 103 | cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307) |
104 | cflags-$(CONFIG_M5407) := $(call cc-option,-m5407,-m5200) | 104 | cflags-$(CONFIG_M5407) := $(call cc-option,-mcpu=5407,-m5200) |
105 | cflags-$(CONFIG_M548x) := $(call cc-option,-m5407,-m5200) | 105 | cflags-$(CONFIG_M54xx) := $(call cc-option,-mcpu=5475,-m5200) |
106 | cflags-$(CONFIG_M68328) := -m68000 | 106 | cflags-$(CONFIG_M68328) := -m68000 |
107 | cflags-$(CONFIG_M68EZ328) := -m68000 | 107 | cflags-$(CONFIG_M68EZ328) := -m68000 |
108 | cflags-$(CONFIG_M68VZ328) := -m68000 | 108 | cflags-$(CONFIG_M68VZ328) := -m68000 |
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c index c684adf5dc40..16b2de7f5101 100644 --- a/arch/m68knommu/kernel/setup.c +++ b/arch/m68knommu/kernel/setup.c | |||
@@ -55,55 +55,29 @@ void (*mach_halt)(void); | |||
55 | void (*mach_power_off)(void); | 55 | void (*mach_power_off)(void); |
56 | 56 | ||
57 | #ifdef CONFIG_M68328 | 57 | #ifdef CONFIG_M68328 |
58 | #define CPU "MC68328" | 58 | #define CPU_NAME "MC68328" |
59 | #endif | 59 | #endif |
60 | #ifdef CONFIG_M68EZ328 | 60 | #ifdef CONFIG_M68EZ328 |
61 | #define CPU "MC68EZ328" | 61 | #define CPU_NAME "MC68EZ328" |
62 | #endif | 62 | #endif |
63 | #ifdef CONFIG_M68VZ328 | 63 | #ifdef CONFIG_M68VZ328 |
64 | #define CPU "MC68VZ328" | 64 | #define CPU_NAME "MC68VZ328" |
65 | #endif | 65 | #endif |
66 | #ifdef CONFIG_M68360 | 66 | #ifdef CONFIG_M68360 |
67 | #define CPU "MC68360" | 67 | #define CPU_NAME "MC68360" |
68 | #endif | 68 | #endif |
69 | #if defined(CONFIG_M5206) | 69 | #ifndef CPU_NAME |
70 | #define CPU "COLDFIRE(m5206)" | 70 | #define CPU_NAME "UNKNOWN" |
71 | #endif | 71 | #endif |
72 | #if defined(CONFIG_M5206e) | 72 | |
73 | #define CPU "COLDFIRE(m5206e)" | 73 | /* |
74 | #endif | 74 | * Different cores have different instruction execution timings. |
75 | #if defined(CONFIG_M520x) | 75 | * The old/traditional 68000 cores are basically all the same, at 16. |
76 | #define CPU "COLDFIRE(m520x)" | 76 | * The ColdFire cores vary a little, their values are defined in their |
77 | #endif | 77 | * headers. We default to the standard 68000 value here. |
78 | #if defined(CONFIG_M523x) | 78 | */ |
79 | #define CPU "COLDFIRE(m523x)" | 79 | #ifndef CPU_INSTR_PER_JIFFY |
80 | #endif | 80 | #define CPU_INSTR_PER_JIFFY 16 |
81 | #if defined(CONFIG_M5249) | ||
82 | #define CPU "COLDFIRE(m5249)" | ||
83 | #endif | ||
84 | #if defined(CONFIG_M5271) | ||
85 | #define CPU "COLDFIRE(m5270/5271)" | ||
86 | #endif | ||
87 | #if defined(CONFIG_M5272) | ||
88 | #define CPU "COLDFIRE(m5272)" | ||
89 | #endif | ||
90 | #if defined(CONFIG_M5275) | ||
91 | #define CPU "COLDFIRE(m5274/5275)" | ||
92 | #endif | ||
93 | #if defined(CONFIG_M528x) | ||
94 | #define CPU "COLDFIRE(m5280/5282)" | ||
95 | #endif | ||
96 | #if defined(CONFIG_M5307) | ||
97 | #define CPU "COLDFIRE(m5307)" | ||
98 | #endif | ||
99 | #if defined(CONFIG_M532x) | ||
100 | #define CPU "COLDFIRE(m532x)" | ||
101 | #endif | ||
102 | #if defined(CONFIG_M5407) | ||
103 | #define CPU "COLDFIRE(m5407)" | ||
104 | #endif | ||
105 | #ifndef CPU | ||
106 | #define CPU "UNKNOWN" | ||
107 | #endif | 81 | #endif |
108 | 82 | ||
109 | extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end; | 83 | extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end; |
@@ -208,7 +182,7 @@ void __init setup_arch(char **cmdline_p) | |||
208 | command_line[sizeof(command_line) - 1] = 0; | 182 | command_line[sizeof(command_line) - 1] = 0; |
209 | #endif /* CONFIG_UBOOT */ | 183 | #endif /* CONFIG_UBOOT */ |
210 | 184 | ||
211 | printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU "\n"); | 185 | printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU_NAME "\n"); |
212 | 186 | ||
213 | #ifdef CONFIG_UCDIMM | 187 | #ifdef CONFIG_UCDIMM |
214 | printk(KERN_INFO "uCdimm by Lineo, Inc. <www.lineo.com>\n"); | 188 | printk(KERN_INFO "uCdimm by Lineo, Inc. <www.lineo.com>\n"); |
@@ -257,11 +231,6 @@ void __init setup_arch(char **cmdline_p) | |||
257 | memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); | 231 | memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); |
258 | boot_command_line[COMMAND_LINE_SIZE-1] = 0; | 232 | boot_command_line[COMMAND_LINE_SIZE-1] = 0; |
259 | 233 | ||
260 | #ifdef DEBUG | ||
261 | if (strlen(*cmdline_p)) | ||
262 | printk(KERN_DEBUG "Command line: '%s'\n", *cmdline_p); | ||
263 | #endif | ||
264 | |||
265 | #if defined(CONFIG_FRAMEBUFFER_CONSOLE) && defined(CONFIG_DUMMY_CONSOLE) | 234 | #if defined(CONFIG_FRAMEBUFFER_CONSOLE) && defined(CONFIG_DUMMY_CONSOLE) |
266 | conswitchp = &dummy_con; | 235 | conswitchp = &dummy_con; |
267 | #endif | 236 | #endif |
@@ -303,15 +272,10 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
303 | char *cpu, *mmu, *fpu; | 272 | char *cpu, *mmu, *fpu; |
304 | u_long clockfreq; | 273 | u_long clockfreq; |
305 | 274 | ||
306 | cpu = CPU; | 275 | cpu = CPU_NAME; |
307 | mmu = "none"; | 276 | mmu = "none"; |
308 | fpu = "none"; | 277 | fpu = "none"; |
309 | 278 | clockfreq = (loops_per_jiffy * HZ) * CPU_INSTR_PER_JIFFY; | |
310 | #ifdef CONFIG_COLDFIRE | ||
311 | clockfreq = (loops_per_jiffy * HZ) * 3; | ||
312 | #else | ||
313 | clockfreq = (loops_per_jiffy * HZ) * 16; | ||
314 | #endif | ||
315 | 279 | ||
316 | seq_printf(m, "CPU:\t\t%s\n" | 280 | seq_printf(m, "CPU:\t\t%s\n" |
317 | "MMU:\t\t%s\n" | 281 | "MMU:\t\t%s\n" |
diff --git a/arch/m68knommu/mm/Makefile b/arch/m68knommu/mm/Makefile index fc91f254f51b..b54ab6b4b523 100644 --- a/arch/m68knommu/mm/Makefile +++ b/arch/m68knommu/mm/Makefile | |||
@@ -2,4 +2,4 @@ | |||
2 | # Makefile for the linux m68knommu specific parts of the memory manager. | 2 | # Makefile for the linux m68knommu specific parts of the memory manager. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += init.o fault.o memory.o kmap.o | 5 | obj-y += init.o kmap.o |
diff --git a/arch/m68knommu/mm/fault.c b/arch/m68knommu/mm/fault.c deleted file mode 100644 index bc05cf74d9c0..000000000000 --- a/arch/m68knommu/mm/fault.c +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/m68knommu/mm/fault.c | ||
3 | * | ||
4 | * Copyright (C) 1998 D. Jeff Dionne <jeff@lineo.ca>, | ||
5 | * Copyright (C) 2000 Lineo, Inc. (www.lineo.com) | ||
6 | * | ||
7 | * Based on: | ||
8 | * | ||
9 | * linux/arch/m68k/mm/fault.c | ||
10 | * | ||
11 | * Copyright (C) 1995 Hamish Macdonald | ||
12 | */ | ||
13 | |||
14 | #include <linux/mman.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/ptrace.h> | ||
18 | |||
19 | #include <asm/system.h> | ||
20 | #include <asm/pgtable.h> | ||
21 | |||
22 | extern void die_if_kernel(char *, struct pt_regs *, long); | ||
23 | |||
24 | /* | ||
25 | * This routine handles page faults. It determines the problem, and | ||
26 | * then passes it off to one of the appropriate routines. | ||
27 | * | ||
28 | * error_code: | ||
29 | * bit 0 == 0 means no page found, 1 means protection fault | ||
30 | * bit 1 == 0 means read, 1 means write | ||
31 | * | ||
32 | * If this routine detects a bad access, it returns 1, otherwise it | ||
33 | * returns 0. | ||
34 | */ | ||
35 | asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address, | ||
36 | unsigned long error_code) | ||
37 | { | ||
38 | #ifdef DEBUG | ||
39 | printk(KERN_DEBUG "regs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld\n", | ||
40 | regs->sr, regs->pc, address, error_code); | ||
41 | #endif | ||
42 | |||
43 | /* | ||
44 | * Oops. The kernel tried to access some bad page. We'll have to | ||
45 | * terminate things with extreme prejudice. | ||
46 | */ | ||
47 | if ((unsigned long) address < PAGE_SIZE) | ||
48 | printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); | ||
49 | else | ||
50 | printk(KERN_ALERT "Unable to handle kernel access"); | ||
51 | printk(KERN_ALERT " at virtual address %08lx\n", address); | ||
52 | die_if_kernel("Oops", regs, error_code); | ||
53 | do_exit(SIGKILL); | ||
54 | |||
55 | return 1; | ||
56 | } | ||
57 | |||
diff --git a/arch/m68knommu/mm/kmap.c b/arch/m68knommu/mm/kmap.c index 902c1dfda9e5..ece8d5ad4e6c 100644 --- a/arch/m68knommu/mm/kmap.c +++ b/arch/m68knommu/mm/kmap.c | |||
@@ -36,15 +36,6 @@ void iounmap(void *addr) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * __iounmap unmaps nearly everything, so be careful | ||
40 | * it doesn't free currently pointer/page tables anymore but it | ||
41 | * wans't used anyway and might be added later. | ||
42 | */ | ||
43 | void __iounmap(void *addr, unsigned long size) | ||
44 | { | ||
45 | } | ||
46 | |||
47 | /* | ||
48 | * Set new cache mode for some kernel address space. | 39 | * Set new cache mode for some kernel address space. |
49 | * The caller must push data for that range itself, if such data may already | 40 | * The caller must push data for that range itself, if such data may already |
50 | * be in the cache. | 41 | * be in the cache. |
diff --git a/arch/m68knommu/mm/memory.c b/arch/m68knommu/mm/memory.c deleted file mode 100644 index 8f7949e786d4..000000000000 --- a/arch/m68knommu/mm/memory.c +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/m68knommu/mm/memory.c | ||
3 | * | ||
4 | * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>, | ||
5 | * Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) | ||
6 | * | ||
7 | * Based on: | ||
8 | * | ||
9 | * linux/arch/m68k/mm/memory.c | ||
10 | * | ||
11 | * Copyright (C) 1995 Hamish Macdonald | ||
12 | */ | ||
13 | |||
14 | #include <linux/mm.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/string.h> | ||
17 | #include <linux/types.h> | ||
18 | |||
19 | #include <asm/segment.h> | ||
20 | #include <asm/page.h> | ||
21 | #include <asm/pgtable.h> | ||
22 | #include <asm/system.h> | ||
23 | |||
24 | /* | ||
25 | * Map some physical address range into the kernel address space. | ||
26 | */ | ||
27 | |||
28 | unsigned long kernel_map(unsigned long paddr, unsigned long size, | ||
29 | int nocacheflag, unsigned long *memavailp ) | ||
30 | { | ||
31 | return paddr; | ||
32 | } | ||
33 | |||
diff --git a/arch/m68knommu/platform/548x/Makefile b/arch/m68knommu/platform/54xx/Makefile index e6035e7a2d3f..e6035e7a2d3f 100644 --- a/arch/m68knommu/platform/548x/Makefile +++ b/arch/m68knommu/platform/54xx/Makefile | |||
diff --git a/arch/m68knommu/platform/548x/config.c b/arch/m68knommu/platform/54xx/config.c index 9888846bd1cf..78130984db95 100644 --- a/arch/m68knommu/platform/548x/config.c +++ b/arch/m68knommu/platform/54xx/config.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /***************************************************************************/ | 1 | /***************************************************************************/ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * linux/arch/m68knommu/platform/548x/config.c | 4 | * linux/arch/m68knommu/platform/54xx/config.c |
5 | * | 5 | * |
6 | * Copyright (C) 2010, Philippe De Muyter <phdm@macqel.be> | 6 | * Copyright (C) 2010, Philippe De Muyter <phdm@macqel.be> |
7 | */ | 7 | */ |
@@ -15,13 +15,13 @@ | |||
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <asm/machdep.h> | 16 | #include <asm/machdep.h> |
17 | #include <asm/coldfire.h> | 17 | #include <asm/coldfire.h> |
18 | #include <asm/m548xsim.h> | 18 | #include <asm/m54xxsim.h> |
19 | #include <asm/mcfuart.h> | 19 | #include <asm/mcfuart.h> |
20 | #include <asm/m548xgpt.h> | 20 | #include <asm/m54xxgpt.h> |
21 | 21 | ||
22 | /***************************************************************************/ | 22 | /***************************************************************************/ |
23 | 23 | ||
24 | static struct mcf_platform_uart m548x_uart_platform[] = { | 24 | static struct mcf_platform_uart m54xx_uart_platform[] = { |
25 | { | 25 | { |
26 | .mapbase = MCF_MBAR + MCFUART_BASE1, | 26 | .mapbase = MCF_MBAR + MCFUART_BASE1, |
27 | .irq = 64 + 35, | 27 | .irq = 64 + 35, |
@@ -40,20 +40,20 @@ static struct mcf_platform_uart m548x_uart_platform[] = { | |||
40 | }, | 40 | }, |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static struct platform_device m548x_uart = { | 43 | static struct platform_device m54xx_uart = { |
44 | .name = "mcfuart", | 44 | .name = "mcfuart", |
45 | .id = 0, | 45 | .id = 0, |
46 | .dev.platform_data = m548x_uart_platform, | 46 | .dev.platform_data = m54xx_uart_platform, |
47 | }; | 47 | }; |
48 | 48 | ||
49 | static struct platform_device *m548x_devices[] __initdata = { | 49 | static struct platform_device *m54xx_devices[] __initdata = { |
50 | &m548x_uart, | 50 | &m54xx_uart, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | 53 | ||
54 | /***************************************************************************/ | 54 | /***************************************************************************/ |
55 | 55 | ||
56 | static void __init m548x_uart_init_line(int line, int irq) | 56 | static void __init m54xx_uart_init_line(int line, int irq) |
57 | { | 57 | { |
58 | int rts_cts; | 58 | int rts_cts; |
59 | 59 | ||
@@ -72,18 +72,18 @@ static void __init m548x_uart_init_line(int line, int irq) | |||
72 | MCF_MBAR + MCF_PAR_PSC(line)); | 72 | MCF_MBAR + MCF_PAR_PSC(line)); |
73 | } | 73 | } |
74 | 74 | ||
75 | static void __init m548x_uarts_init(void) | 75 | static void __init m54xx_uarts_init(void) |
76 | { | 76 | { |
77 | const int nrlines = ARRAY_SIZE(m548x_uart_platform); | 77 | const int nrlines = ARRAY_SIZE(m54xx_uart_platform); |
78 | int line; | 78 | int line; |
79 | 79 | ||
80 | for (line = 0; (line < nrlines); line++) | 80 | for (line = 0; (line < nrlines); line++) |
81 | m548x_uart_init_line(line, m548x_uart_platform[line].irq); | 81 | m54xx_uart_init_line(line, m54xx_uart_platform[line].irq); |
82 | } | 82 | } |
83 | 83 | ||
84 | /***************************************************************************/ | 84 | /***************************************************************************/ |
85 | 85 | ||
86 | static void mcf548x_reset(void) | 86 | static void mcf54xx_reset(void) |
87 | { | 87 | { |
88 | /* disable interrupts and enable the watchdog */ | 88 | /* disable interrupts and enable the watchdog */ |
89 | asm("movew #0x2700, %sr\n"); | 89 | asm("movew #0x2700, %sr\n"); |
@@ -97,8 +97,8 @@ static void mcf548x_reset(void) | |||
97 | 97 | ||
98 | void __init config_BSP(char *commandp, int size) | 98 | void __init config_BSP(char *commandp, int size) |
99 | { | 99 | { |
100 | mach_reset = mcf548x_reset; | 100 | mach_reset = mcf54xx_reset; |
101 | m548x_uarts_init(); | 101 | m54xx_uarts_init(); |
102 | } | 102 | } |
103 | 103 | ||
104 | /***************************************************************************/ | 104 | /***************************************************************************/ |
@@ -106,7 +106,7 @@ void __init config_BSP(char *commandp, int size) | |||
106 | static int __init init_BSP(void) | 106 | static int __init init_BSP(void) |
107 | { | 107 | { |
108 | 108 | ||
109 | platform_add_devices(m548x_devices, ARRAY_SIZE(m548x_devices)); | 109 | platform_add_devices(m54xx_devices, ARRAY_SIZE(m54xx_devices)); |
110 | return 0; | 110 | return 0; |
111 | } | 111 | } |
112 | 112 | ||
diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c index 865852806a17..2a3af193ccd3 100644 --- a/arch/m68knommu/platform/68328/ints.c +++ b/arch/m68knommu/platform/68328/ints.c | |||
@@ -179,8 +179,8 @@ void __init init_IRQ(void) | |||
179 | IMR = ~0; | 179 | IMR = ~0; |
180 | 180 | ||
181 | for (i = 0; (i < NR_IRQS); i++) { | 181 | for (i = 0; (i < NR_IRQS); i++) { |
182 | set_irq_chip(irq, &intc_irq_chip); | 182 | set_irq_chip(i, &intc_irq_chip); |
183 | set_irq_handler(irq, handle_level_irq); | 183 | set_irq_handler(i, handle_level_irq); |
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
diff --git a/arch/m68knommu/platform/coldfire/Makefile b/arch/m68knommu/platform/coldfire/Makefile index 45f501fa4525..a8967baabd72 100644 --- a/arch/m68knommu/platform/coldfire/Makefile +++ b/arch/m68knommu/platform/coldfire/Makefile | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 | 15 | asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 |
16 | 16 | ||
17 | obj-$(CONFIG_COLDFIRE) += clk.o dma.o entry.o vectors.o | 17 | obj-$(CONFIG_COLDFIRE) += cache.o clk.o dma.o entry.o vectors.o |
18 | obj-$(CONFIG_M5206) += timers.o intc.o | 18 | obj-$(CONFIG_M5206) += timers.o intc.o |
19 | obj-$(CONFIG_M5206e) += timers.o intc.o | 19 | obj-$(CONFIG_M5206e) += timers.o intc.o |
20 | obj-$(CONFIG_M520x) += pit.o intc-simr.o | 20 | obj-$(CONFIG_M520x) += pit.o intc-simr.o |
@@ -26,7 +26,7 @@ obj-$(CONFIG_M528x) += pit.o intc-2.o | |||
26 | obj-$(CONFIG_M5307) += timers.o intc.o | 26 | obj-$(CONFIG_M5307) += timers.o intc.o |
27 | obj-$(CONFIG_M532x) += timers.o intc-simr.o | 27 | obj-$(CONFIG_M532x) += timers.o intc-simr.o |
28 | obj-$(CONFIG_M5407) += timers.o intc.o | 28 | obj-$(CONFIG_M5407) += timers.o intc.o |
29 | obj-$(CONFIG_M548x) += sltimers.o intc-2.o | 29 | obj-$(CONFIG_M54xx) += sltimers.o intc-2.o |
30 | 30 | ||
31 | obj-y += pinmux.o gpio.o | 31 | obj-y += pinmux.o gpio.o |
32 | extra-y := head.o | 32 | extra-y := head.o |
diff --git a/arch/m68knommu/platform/coldfire/cache.c b/arch/m68knommu/platform/coldfire/cache.c new file mode 100644 index 000000000000..235d3c4f4f0f --- /dev/null +++ b/arch/m68knommu/platform/coldfire/cache.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /***************************************************************************/ | ||
2 | |||
3 | /* | ||
4 | * cache.c -- general ColdFire Cache maintainence code | ||
5 | * | ||
6 | * Copyright (C) 2010, Greg Ungerer (gerg@snapgear.com) | ||
7 | */ | ||
8 | |||
9 | /***************************************************************************/ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <asm/coldfire.h> | ||
13 | #include <asm/mcfsim.h> | ||
14 | |||
15 | /***************************************************************************/ | ||
16 | #ifdef CACHE_PUSH | ||
17 | /***************************************************************************/ | ||
18 | |||
19 | /* | ||
20 | * Use cpushl to push all dirty cache lines back to memory. | ||
21 | * Older versions of GAS don't seem to know how to generate the | ||
22 | * ColdFire cpushl instruction... Oh well, bit stuff it for now. | ||
23 | */ | ||
24 | |||
25 | void mcf_cache_push(void) | ||
26 | { | ||
27 | __asm__ __volatile__ ( | ||
28 | "clrl %%d0\n\t" | ||
29 | "1:\n\t" | ||
30 | "movel %%d0,%%a0\n\t" | ||
31 | "2:\n\t" | ||
32 | ".word 0xf468\n\t" | ||
33 | "addl %0,%%a0\n\t" | ||
34 | "cmpl %1,%%a0\n\t" | ||
35 | "blt 2b\n\t" | ||
36 | "addql #1,%%d0\n\t" | ||
37 | "cmpil %2,%%d0\n\t" | ||
38 | "bne 1b\n\t" | ||
39 | : /* No output */ | ||
40 | : "i" (CACHE_LINE_SIZE), | ||
41 | "i" (DCACHE_SIZE / CACHE_WAYS), | ||
42 | "i" (CACHE_WAYS) | ||
43 | : "d0", "a0" ); | ||
44 | } | ||
45 | |||
46 | /***************************************************************************/ | ||
47 | #endif /* CACHE_PUSH */ | ||
48 | /***************************************************************************/ | ||
diff --git a/arch/m68knommu/platform/coldfire/entry.S b/arch/m68knommu/platform/coldfire/entry.S index e1debc8285ef..4ddfc3da70d8 100644 --- a/arch/m68knommu/platform/coldfire/entry.S +++ b/arch/m68knommu/platform/coldfire/entry.S | |||
@@ -36,13 +36,16 @@ | |||
36 | #include <asm/asm-offsets.h> | 36 | #include <asm/asm-offsets.h> |
37 | #include <asm/entry.h> | 37 | #include <asm/entry.h> |
38 | 38 | ||
39 | #ifdef CONFIG_COLDFIRE_SW_A7 | ||
40 | /* | ||
41 | * Define software copies of the supervisor and user stack pointers. | ||
42 | */ | ||
39 | .bss | 43 | .bss |
40 | |||
41 | sw_ksp: | 44 | sw_ksp: |
42 | .long 0 | 45 | .long 0 |
43 | |||
44 | sw_usp: | 46 | sw_usp: |
45 | .long 0 | 47 | .long 0 |
48 | #endif /* CONFIG_COLDFIRE_SW_A7 */ | ||
46 | 49 | ||
47 | .text | 50 | .text |
48 | 51 | ||
@@ -51,7 +54,6 @@ sw_usp: | |||
51 | .globl ret_from_exception | 54 | .globl ret_from_exception |
52 | .globl ret_from_signal | 55 | .globl ret_from_signal |
53 | .globl sys_call_table | 56 | .globl sys_call_table |
54 | .globl ret_from_interrupt | ||
55 | .globl inthandler | 57 | .globl inthandler |
56 | .globl fasthandler | 58 | .globl fasthandler |
57 | 59 | ||
@@ -140,20 +142,7 @@ Luser_return: | |||
140 | jne Lwork_to_do /* still work to do */ | 142 | jne Lwork_to_do /* still work to do */ |
141 | 143 | ||
142 | Lreturn: | 144 | Lreturn: |
143 | move #0x2700,%sr /* disable intrs */ | 145 | RESTORE_USER |
144 | movel sw_usp,%a0 /* get usp */ | ||
145 | movel %sp@(PT_OFF_PC),%a0@- /* copy exception program counter */ | ||
146 | movel %sp@(PT_OFF_FORMATVEC),%a0@- /* copy exception format/vector/sr */ | ||
147 | moveml %sp@,%d1-%d5/%a0-%a2 | ||
148 | lea %sp@(32),%sp /* space for 8 regs */ | ||
149 | movel %sp@+,%d0 | ||
150 | addql #4,%sp /* orig d0 */ | ||
151 | addl %sp@+,%sp /* stk adj */ | ||
152 | addql #8,%sp /* remove exception */ | ||
153 | movel %sp,sw_ksp /* save ksp */ | ||
154 | subql #8,sw_usp /* set exception */ | ||
155 | movel sw_usp,%sp /* restore usp */ | ||
156 | rte | ||
157 | 146 | ||
158 | Lwork_to_do: | 147 | Lwork_to_do: |
159 | movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ | 148 | movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ |
@@ -191,31 +180,7 @@ ENTRY(inthandler) | |||
191 | jbsr do_IRQ /* call high level irq handler */ | 180 | jbsr do_IRQ /* call high level irq handler */ |
192 | lea %sp@(8),%sp /* pop args off stack */ | 181 | lea %sp@(8),%sp /* pop args off stack */ |
193 | 182 | ||
194 | bra ret_from_interrupt /* this was fallthrough */ | 183 | bra ret_from_exception |
195 | |||
196 | /* | ||
197 | * This is the fast interrupt handler (for certain hardware interrupt | ||
198 | * sources). Unlike the normal interrupt handler it just uses the | ||
199 | * current stack (doesn't care if it is user or kernel). It also | ||
200 | * doesn't bother doing the bottom half handlers. | ||
201 | */ | ||
202 | ENTRY(fasthandler) | ||
203 | SAVE_LOCAL | ||
204 | |||
205 | movew %sp@(PT_OFF_FORMATVEC),%d0 | ||
206 | andl #0x03fc,%d0 /* mask out vector only */ | ||
207 | |||
208 | movel %sp,%sp@- /* push regs arg */ | ||
209 | lsrl #2,%d0 /* calculate real vector # */ | ||
210 | movel %d0,%sp@- /* push vector number */ | ||
211 | jbsr do_IRQ /* call high level irq handler */ | ||
212 | lea %sp@(8),%sp /* pop args off stack */ | ||
213 | |||
214 | RESTORE_LOCAL | ||
215 | |||
216 | ENTRY(ret_from_interrupt) | ||
217 | /* the fasthandler is confusing me, haven't seen any user */ | ||
218 | jmp ret_from_exception | ||
219 | 184 | ||
220 | /* | 185 | /* |
221 | * Beware - when entering resume, prev (the current task) is | 186 | * Beware - when entering resume, prev (the current task) is |
@@ -226,9 +191,8 @@ ENTRY(ret_from_interrupt) | |||
226 | */ | 191 | */ |
227 | ENTRY(resume) | 192 | ENTRY(resume) |
228 | movel %a0, %d1 /* get prev thread in d1 */ | 193 | movel %a0, %d1 /* get prev thread in d1 */ |
229 | 194 | RDUSP | |
230 | movel sw_usp,%d0 /* save usp */ | 195 | movel %a2,%a0@(TASK_THREAD+THREAD_USP) |
231 | movel %d0,%a0@(TASK_THREAD+THREAD_USP) | ||
232 | 196 | ||
233 | SAVE_SWITCH_STACK | 197 | SAVE_SWITCH_STACK |
234 | movel %sp,%a0@(TASK_THREAD+THREAD_KSP) /* save kernel stack pointer */ | 198 | movel %sp,%a0@(TASK_THREAD+THREAD_KSP) /* save kernel stack pointer */ |
@@ -236,5 +200,5 @@ ENTRY(resume) | |||
236 | RESTORE_SWITCH_STACK | 200 | RESTORE_SWITCH_STACK |
237 | 201 | ||
238 | movel %a1@(TASK_THREAD+THREAD_USP),%a0 /* restore thread user stack */ | 202 | movel %a1@(TASK_THREAD+THREAD_USP),%a0 /* restore thread user stack */ |
239 | movel %a0, sw_usp | 203 | WRUSP |
240 | rts | 204 | rts |
diff --git a/arch/m68knommu/platform/coldfire/head.S b/arch/m68knommu/platform/coldfire/head.S index 0b2d7c7adf79..d5977909ae5f 100644 --- a/arch/m68knommu/platform/coldfire/head.S +++ b/arch/m68knommu/platform/coldfire/head.S | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * head.S -- common startup code for ColdFire CPUs. | 4 | * head.S -- common startup code for ColdFire CPUs. |
5 | * | 5 | * |
6 | * (C) Copyright 1999-2006, Greg Ungerer <gerg@snapgear.com>. | 6 | * (C) Copyright 1999-2010, Greg Ungerer <gerg@snapgear.com>. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | /*****************************************************************************/ | 9 | /*****************************************************************************/ |
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <asm/asm-offsets.h> | 14 | #include <asm/asm-offsets.h> |
15 | #include <asm/coldfire.h> | 15 | #include <asm/coldfire.h> |
16 | #include <asm/mcfcache.h> | ||
17 | #include <asm/mcfsim.h> | 16 | #include <asm/mcfsim.h> |
18 | #include <asm/thread_info.h> | 17 | #include <asm/thread_info.h> |
19 | 18 | ||
@@ -173,10 +172,27 @@ _start: | |||
173 | 172 | ||
174 | /* | 173 | /* |
175 | * Now that we know what the memory is, lets enable cache | 174 | * Now that we know what the memory is, lets enable cache |
176 | * and get things moving. This is Coldfire CPU specific. | 175 | * and get things moving. This is Coldfire CPU specific. Not |
176 | * all version cores have identical cache register setup. But | ||
177 | * it is very similar. Define the exact settings in the headers | ||
178 | * then the code here is the same for all. | ||
177 | */ | 179 | */ |
178 | CACHE_ENABLE /* enable CPU cache */ | 180 | movel #CACHE_INIT,%d0 /* invalidate whole cache */ |
179 | 181 | movec %d0,%CACR | |
182 | nop | ||
183 | movel #ACR0_MODE,%d0 /* set RAM region for caching */ | ||
184 | movec %d0,%ACR0 | ||
185 | movel #ACR1_MODE,%d0 /* anything else to cache? */ | ||
186 | movec %d0,%ACR1 | ||
187 | #ifdef ACR2_MODE | ||
188 | movel #ACR2_MODE,%d0 | ||
189 | movec %d0,%ACR2 | ||
190 | movel #ACR3_MODE,%d0 | ||
191 | movec %d0,%ACR3 | ||
192 | #endif | ||
193 | movel #CACHE_MODE,%d0 /* enable cache */ | ||
194 | movec %d0,%CACR | ||
195 | nop | ||
180 | 196 | ||
181 | #ifdef CONFIG_ROMFS_FS | 197 | #ifdef CONFIG_ROMFS_FS |
182 | /* | 198 | /* |