diff options
105 files changed, 791 insertions, 1880 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9722f8bb506c..29759cd25553 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -201,6 +201,7 @@ choice | |||
201 | 201 | ||
202 | config ARCH_AAEC2000 | 202 | config ARCH_AAEC2000 |
203 | bool "Agilent AAEC-2000 based" | 203 | bool "Agilent AAEC-2000 based" |
204 | select CPU_ARM920T | ||
204 | select ARM_AMBA | 205 | select ARM_AMBA |
205 | select HAVE_CLK | 206 | select HAVE_CLK |
206 | help | 207 | help |
@@ -210,6 +211,7 @@ config ARCH_INTEGRATOR | |||
210 | bool "ARM Ltd. Integrator family" | 211 | bool "ARM Ltd. Integrator family" |
211 | select ARM_AMBA | 212 | select ARM_AMBA |
212 | select HAVE_CLK | 213 | select HAVE_CLK |
214 | select COMMON_CLKDEV | ||
213 | select ICST525 | 215 | select ICST525 |
214 | help | 216 | help |
215 | Support for ARM's Integrator platform. | 217 | Support for ARM's Integrator platform. |
@@ -218,6 +220,7 @@ config ARCH_REALVIEW | |||
218 | bool "ARM Ltd. RealView family" | 220 | bool "ARM Ltd. RealView family" |
219 | select ARM_AMBA | 221 | select ARM_AMBA |
220 | select HAVE_CLK | 222 | select HAVE_CLK |
223 | select COMMON_CLKDEV | ||
221 | select ICST307 | 224 | select ICST307 |
222 | select GENERIC_TIME | 225 | select GENERIC_TIME |
223 | select GENERIC_CLOCKEVENTS | 226 | select GENERIC_CLOCKEVENTS |
@@ -229,6 +232,7 @@ config ARCH_VERSATILE | |||
229 | select ARM_AMBA | 232 | select ARM_AMBA |
230 | select ARM_VIC | 233 | select ARM_VIC |
231 | select HAVE_CLK | 234 | select HAVE_CLK |
235 | select COMMON_CLKDEV | ||
232 | select ICST307 | 236 | select ICST307 |
233 | select GENERIC_TIME | 237 | select GENERIC_TIME |
234 | select GENERIC_CLOCKEVENTS | 238 | select GENERIC_CLOCKEVENTS |
@@ -243,22 +247,15 @@ config ARCH_AT91 | |||
243 | This enables support for systems based on the Atmel AT91RM9200, | 247 | This enables support for systems based on the Atmel AT91RM9200, |
244 | AT91SAM9 and AT91CAP9 processors. | 248 | AT91SAM9 and AT91CAP9 processors. |
245 | 249 | ||
246 | config ARCH_CLPS7500 | ||
247 | bool "Cirrus CL-PS7500FE" | ||
248 | select TIMER_ACORN | ||
249 | select ISA | ||
250 | select NO_IOPORT | ||
251 | select ARCH_SPARSEMEM_ENABLE | ||
252 | help | ||
253 | Support for the Cirrus Logic PS7500FE system-on-a-chip. | ||
254 | |||
255 | config ARCH_CLPS711X | 250 | config ARCH_CLPS711X |
256 | bool "Cirrus Logic CLPS711x/EP721x-based" | 251 | bool "Cirrus Logic CLPS711x/EP721x-based" |
252 | select CPU_ARM720T | ||
257 | help | 253 | help |
258 | Support for Cirrus Logic 711x/721x based boards. | 254 | Support for Cirrus Logic 711x/721x based boards. |
259 | 255 | ||
260 | config ARCH_EBSA110 | 256 | config ARCH_EBSA110 |
261 | bool "EBSA-110" | 257 | bool "EBSA-110" |
258 | select CPU_SA110 | ||
262 | select ISA | 259 | select ISA |
263 | select NO_IOPORT | 260 | select NO_IOPORT |
264 | help | 261 | help |
@@ -269,6 +266,7 @@ config ARCH_EBSA110 | |||
269 | 266 | ||
270 | config ARCH_EP93XX | 267 | config ARCH_EP93XX |
271 | bool "EP93xx-based" | 268 | bool "EP93xx-based" |
269 | select CPU_ARM920T | ||
272 | select ARM_AMBA | 270 | select ARM_AMBA |
273 | select ARM_VIC | 271 | select ARM_VIC |
274 | select GENERIC_GPIO | 272 | select GENERIC_GPIO |
@@ -279,6 +277,7 @@ config ARCH_EP93XX | |||
279 | 277 | ||
280 | config ARCH_FOOTBRIDGE | 278 | config ARCH_FOOTBRIDGE |
281 | bool "FootBridge" | 279 | bool "FootBridge" |
280 | select CPU_SA110 | ||
282 | select FOOTBRIDGE | 281 | select FOOTBRIDGE |
283 | help | 282 | help |
284 | Support for systems based on the DC21285 companion chip | 283 | Support for systems based on the DC21285 companion chip |
@@ -286,18 +285,21 @@ config ARCH_FOOTBRIDGE | |||
286 | 285 | ||
287 | config ARCH_NETX | 286 | config ARCH_NETX |
288 | bool "Hilscher NetX based" | 287 | bool "Hilscher NetX based" |
288 | select CPU_ARM926T | ||
289 | select ARM_VIC | 289 | select ARM_VIC |
290 | help | 290 | help |
291 | This enables support for systems based on the Hilscher NetX Soc | 291 | This enables support for systems based on the Hilscher NetX Soc |
292 | 292 | ||
293 | config ARCH_H720X | 293 | config ARCH_H720X |
294 | bool "Hynix HMS720x-based" | 294 | bool "Hynix HMS720x-based" |
295 | select CPU_ARM720T | ||
295 | select ISA_DMA_API | 296 | select ISA_DMA_API |
296 | help | 297 | help |
297 | This enables support for systems based on the Hynix HMS720x | 298 | This enables support for systems based on the Hynix HMS720x |
298 | 299 | ||
299 | config ARCH_IMX | 300 | config ARCH_IMX |
300 | bool "IMX" | 301 | bool "IMX" |
302 | select CPU_ARM920T | ||
301 | select GENERIC_GPIO | 303 | select GENERIC_GPIO |
302 | select GENERIC_TIME | 304 | select GENERIC_TIME |
303 | select GENERIC_CLOCKEVENTS | 305 | select GENERIC_CLOCKEVENTS |
@@ -307,6 +309,7 @@ config ARCH_IMX | |||
307 | config ARCH_IOP13XX | 309 | config ARCH_IOP13XX |
308 | bool "IOP13xx-based" | 310 | bool "IOP13xx-based" |
309 | depends on MMU | 311 | depends on MMU |
312 | select CPU_XSC3 | ||
310 | select PLAT_IOP | 313 | select PLAT_IOP |
311 | select PCI | 314 | select PCI |
312 | select ARCH_SUPPORTS_MSI | 315 | select ARCH_SUPPORTS_MSI |
@@ -317,6 +320,7 @@ config ARCH_IOP13XX | |||
317 | config ARCH_IOP32X | 320 | config ARCH_IOP32X |
318 | bool "IOP32x-based" | 321 | bool "IOP32x-based" |
319 | depends on MMU | 322 | depends on MMU |
323 | select CPU_XSCALE | ||
320 | select PLAT_IOP | 324 | select PLAT_IOP |
321 | select PCI | 325 | select PCI |
322 | select GENERIC_GPIO | 326 | select GENERIC_GPIO |
@@ -328,6 +332,7 @@ config ARCH_IOP32X | |||
328 | config ARCH_IOP33X | 332 | config ARCH_IOP33X |
329 | bool "IOP33x-based" | 333 | bool "IOP33x-based" |
330 | depends on MMU | 334 | depends on MMU |
335 | select CPU_XSCALE | ||
331 | select PLAT_IOP | 336 | select PLAT_IOP |
332 | select PCI | 337 | select PCI |
333 | select GENERIC_GPIO | 338 | select GENERIC_GPIO |
@@ -338,6 +343,7 @@ config ARCH_IOP33X | |||
338 | config ARCH_IXP23XX | 343 | config ARCH_IXP23XX |
339 | bool "IXP23XX-based" | 344 | bool "IXP23XX-based" |
340 | depends on MMU | 345 | depends on MMU |
346 | select CPU_XSC3 | ||
341 | select PCI | 347 | select PCI |
342 | help | 348 | help |
343 | Support for Intel's IXP23xx (XScale) family of processors. | 349 | Support for Intel's IXP23xx (XScale) family of processors. |
@@ -345,6 +351,7 @@ config ARCH_IXP23XX | |||
345 | config ARCH_IXP2000 | 351 | config ARCH_IXP2000 |
346 | bool "IXP2400/2800-based" | 352 | bool "IXP2400/2800-based" |
347 | depends on MMU | 353 | depends on MMU |
354 | select CPU_XSCALE | ||
348 | select PCI | 355 | select PCI |
349 | help | 356 | help |
350 | Support for Intel's IXP2400/2800 (XScale) family of processors. | 357 | Support for Intel's IXP2400/2800 (XScale) family of processors. |
@@ -352,6 +359,7 @@ config ARCH_IXP2000 | |||
352 | config ARCH_IXP4XX | 359 | config ARCH_IXP4XX |
353 | bool "IXP4xx-based" | 360 | bool "IXP4xx-based" |
354 | depends on MMU | 361 | depends on MMU |
362 | select CPU_XSCALE | ||
355 | select GENERIC_GPIO | 363 | select GENERIC_GPIO |
356 | select GENERIC_TIME | 364 | select GENERIC_TIME |
357 | select GENERIC_CLOCKEVENTS | 365 | select GENERIC_CLOCKEVENTS |
@@ -361,6 +369,7 @@ config ARCH_IXP4XX | |||
361 | 369 | ||
362 | config ARCH_L7200 | 370 | config ARCH_L7200 |
363 | bool "LinkUp-L7200" | 371 | bool "LinkUp-L7200" |
372 | select CPU_ARM720T | ||
364 | select FIQ | 373 | select FIQ |
365 | help | 374 | help |
366 | Say Y here if you intend to run this kernel on a LinkUp Systems | 375 | Say Y here if you intend to run this kernel on a LinkUp Systems |
@@ -374,6 +383,7 @@ config ARCH_L7200 | |||
374 | 383 | ||
375 | config ARCH_KIRKWOOD | 384 | config ARCH_KIRKWOOD |
376 | bool "Marvell Kirkwood" | 385 | bool "Marvell Kirkwood" |
386 | select CPU_FEROCEON | ||
377 | select PCI | 387 | select PCI |
378 | select GENERIC_TIME | 388 | select GENERIC_TIME |
379 | select GENERIC_CLOCKEVENTS | 389 | select GENERIC_CLOCKEVENTS |
@@ -384,6 +394,7 @@ config ARCH_KIRKWOOD | |||
384 | 394 | ||
385 | config ARCH_KS8695 | 395 | config ARCH_KS8695 |
386 | bool "Micrel/Kendin KS8695" | 396 | bool "Micrel/Kendin KS8695" |
397 | select CPU_ARM922T | ||
387 | select GENERIC_GPIO | 398 | select GENERIC_GPIO |
388 | help | 399 | help |
389 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based | 400 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based |
@@ -391,6 +402,7 @@ config ARCH_KS8695 | |||
391 | 402 | ||
392 | config ARCH_NS9XXX | 403 | config ARCH_NS9XXX |
393 | bool "NetSilicon NS9xxx" | 404 | bool "NetSilicon NS9xxx" |
405 | select CPU_ARM926T | ||
394 | select GENERIC_GPIO | 406 | select GENERIC_GPIO |
395 | select GENERIC_TIME | 407 | select GENERIC_TIME |
396 | select GENERIC_CLOCKEVENTS | 408 | select GENERIC_CLOCKEVENTS |
@@ -403,6 +415,7 @@ config ARCH_NS9XXX | |||
403 | 415 | ||
404 | config ARCH_LOKI | 416 | config ARCH_LOKI |
405 | bool "Marvell Loki (88RC8480)" | 417 | bool "Marvell Loki (88RC8480)" |
418 | select CPU_FEROCEON | ||
406 | select GENERIC_TIME | 419 | select GENERIC_TIME |
407 | select GENERIC_CLOCKEVENTS | 420 | select GENERIC_CLOCKEVENTS |
408 | select PLAT_ORION | 421 | select PLAT_ORION |
@@ -411,6 +424,7 @@ config ARCH_LOKI | |||
411 | 424 | ||
412 | config ARCH_MV78XX0 | 425 | config ARCH_MV78XX0 |
413 | bool "Marvell MV78xx0" | 426 | bool "Marvell MV78xx0" |
427 | select CPU_FEROCEON | ||
414 | select PCI | 428 | select PCI |
415 | select GENERIC_TIME | 429 | select GENERIC_TIME |
416 | select GENERIC_CLOCKEVENTS | 430 | select GENERIC_CLOCKEVENTS |
@@ -432,6 +446,7 @@ config ARCH_MXC | |||
432 | config ARCH_ORION5X | 446 | config ARCH_ORION5X |
433 | bool "Marvell Orion" | 447 | bool "Marvell Orion" |
434 | depends on MMU | 448 | depends on MMU |
449 | select CPU_FEROCEON | ||
435 | select PCI | 450 | select PCI |
436 | select GENERIC_GPIO | 451 | select GENERIC_GPIO |
437 | select GENERIC_TIME | 452 | select GENERIC_TIME |
@@ -444,6 +459,7 @@ config ARCH_ORION5X | |||
444 | 459 | ||
445 | config ARCH_PNX4008 | 460 | config ARCH_PNX4008 |
446 | bool "Philips Nexperia PNX4008 Mobile" | 461 | bool "Philips Nexperia PNX4008 Mobile" |
462 | select CPU_ARM926T | ||
447 | select HAVE_CLK | 463 | select HAVE_CLK |
448 | help | 464 | help |
449 | This enables support for Philips PNX4008 mobile platform. | 465 | This enables support for Philips PNX4008 mobile platform. |
@@ -454,6 +470,7 @@ config ARCH_PXA | |||
454 | select ARCH_MTD_XIP | 470 | select ARCH_MTD_XIP |
455 | select GENERIC_GPIO | 471 | select GENERIC_GPIO |
456 | select HAVE_CLK | 472 | select HAVE_CLK |
473 | select COMMON_CLKDEV | ||
457 | select ARCH_REQUIRE_GPIOLIB | 474 | select ARCH_REQUIRE_GPIOLIB |
458 | select GENERIC_TIME | 475 | select GENERIC_TIME |
459 | select GENERIC_CLOCKEVENTS | 476 | select GENERIC_CLOCKEVENTS |
@@ -477,6 +494,7 @@ config ARCH_RPC | |||
477 | 494 | ||
478 | config ARCH_SA1100 | 495 | config ARCH_SA1100 |
479 | bool "SA1100-based" | 496 | bool "SA1100-based" |
497 | select CPU_SA1100 | ||
480 | select ISA | 498 | select ISA |
481 | select ARCH_SPARSEMEM_ENABLE | 499 | select ARCH_SPARSEMEM_ENABLE |
482 | select ARCH_MTD_XIP | 500 | select ARCH_MTD_XIP |
@@ -500,6 +518,7 @@ config ARCH_S3C2410 | |||
500 | 518 | ||
501 | config ARCH_SHARK | 519 | config ARCH_SHARK |
502 | bool "Shark" | 520 | bool "Shark" |
521 | select CPU_SA110 | ||
503 | select ISA | 522 | select ISA |
504 | select ISA_DMA | 523 | select ISA_DMA |
505 | select ZONE_DMA | 524 | select ZONE_DMA |
@@ -510,6 +529,7 @@ config ARCH_SHARK | |||
510 | 529 | ||
511 | config ARCH_LH7A40X | 530 | config ARCH_LH7A40X |
512 | bool "Sharp LH7A40X" | 531 | bool "Sharp LH7A40X" |
532 | select CPU_ARM922T | ||
513 | select ARCH_DISCONTIGMEM_ENABLE if !LH7A40X_CONTIGMEM | 533 | select ARCH_DISCONTIGMEM_ENABLE if !LH7A40X_CONTIGMEM |
514 | select ARCH_SPARSEMEM_ENABLE if !LH7A40X_CONTIGMEM | 534 | select ARCH_SPARSEMEM_ENABLE if !LH7A40X_CONTIGMEM |
515 | help | 535 | help |
@@ -520,6 +540,7 @@ config ARCH_LH7A40X | |||
520 | 540 | ||
521 | config ARCH_DAVINCI | 541 | config ARCH_DAVINCI |
522 | bool "TI DaVinci" | 542 | bool "TI DaVinci" |
543 | select CPU_ARM926T | ||
523 | select GENERIC_TIME | 544 | select GENERIC_TIME |
524 | select GENERIC_CLOCKEVENTS | 545 | select GENERIC_CLOCKEVENTS |
525 | select GENERIC_GPIO | 546 | select GENERIC_GPIO |
@@ -541,6 +562,7 @@ config ARCH_OMAP | |||
541 | 562 | ||
542 | config ARCH_MSM | 563 | config ARCH_MSM |
543 | bool "Qualcomm MSM" | 564 | bool "Qualcomm MSM" |
565 | select CPU_V6 | ||
544 | select GENERIC_TIME | 566 | select GENERIC_TIME |
545 | select GENERIC_CLOCKEVENTS | 567 | select GENERIC_CLOCKEVENTS |
546 | help | 568 | help |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index bd6e28115ebb..2eca2998f93e 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -96,7 +96,6 @@ textofs-y := 0x00008000 | |||
96 | 96 | ||
97 | machine-$(CONFIG_ARCH_RPC) := rpc | 97 | machine-$(CONFIG_ARCH_RPC) := rpc |
98 | machine-$(CONFIG_ARCH_EBSA110) := ebsa110 | 98 | machine-$(CONFIG_ARCH_EBSA110) := ebsa110 |
99 | machine-$(CONFIG_ARCH_CLPS7500) := clps7500 | ||
100 | machine-$(CONFIG_FOOTBRIDGE) := footbridge | 99 | machine-$(CONFIG_FOOTBRIDGE) := footbridge |
101 | machine-$(CONFIG_ARCH_SHARK) := shark | 100 | machine-$(CONFIG_ARCH_SHARK) := shark |
102 | machine-$(CONFIG_ARCH_SA1100) := sa1100 | 101 | machine-$(CONFIG_ARCH_SA1100) := sa1100 |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index c47f2a3f8f8f..fbe5eef1f6c9 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -23,10 +23,6 @@ ifeq ($(CONFIG_ARCH_L7200),y) | |||
23 | OBJS += head-l7200.o | 23 | OBJS += head-l7200.o |
24 | endif | 24 | endif |
25 | 25 | ||
26 | ifeq ($(CONFIG_ARCH_CLPS7500),y) | ||
27 | HEAD = head-clps7500.o | ||
28 | endif | ||
29 | |||
30 | ifeq ($(CONFIG_ARCH_P720T),y) | 26 | ifeq ($(CONFIG_ARCH_P720T),y) |
31 | # Borrow this code from SA1100 | 27 | # Borrow this code from SA1100 |
32 | OBJS += head-sa1100.o | 28 | OBJS += head-sa1100.o |
diff --git a/arch/arm/boot/compressed/head-clps7500.S b/arch/arm/boot/compressed/head-clps7500.S deleted file mode 100644 index 4f3c78ac30a0..000000000000 --- a/arch/arm/boot/compressed/head-clps7500.S +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/boot/compressed/head-clps7500.S | ||
3 | * | ||
4 | * Copyright (C) 1999, 2000, 2001 Nexus Electronics Ltd | ||
5 | */ | ||
6 | |||
7 | |||
8 | /* There are three different ways the kernel can be | ||
9 | booted on a 7500 system: from Angel (loaded in RAM), from | ||
10 | 16-bit ROM or from 32-bit Flash. Luckily, a single kernel | ||
11 | image does for them all. */ | ||
12 | /* This branch is taken if the CPU memory width matches the | ||
13 | actual device in use. The default at power on is 16 bits | ||
14 | so we must be prepared for a mismatch. */ | ||
15 | .section ".start", "ax" | ||
16 | 2: | ||
17 | b 1f | ||
18 | .word 0xffff | ||
19 | .word 0xb632 @ mov r11, #0x03200000 | ||
20 | .word 0xe3a0 | ||
21 | .word 0x0000 @ mov r0, #0 | ||
22 | .word 0xe3a0 | ||
23 | .word 0x0080 @ strb r0, [r11, #0x80] | ||
24 | .word 0xe5cb | ||
25 | .word 0xf000 @ mov pc, #0 | ||
26 | .word 0xe3a0 | ||
27 | 1: | ||
28 | adr r1, 2b | ||
29 | teq r1, #0 | ||
30 | bne .Langel | ||
31 | /* This is a direct-from-ROM boot. Copy the kernel into | ||
32 | RAM and run it there. */ | ||
33 | mov r0, #0x30 | ||
34 | mcr p15, 0, r0, c1, c0, 0 | ||
35 | mov r0, #0x13 | ||
36 | msr cpsr_cxsf, r0 | ||
37 | mov r12, #0x03000000 @ point to LEDs | ||
38 | orr r12, r12, #0x00020000 | ||
39 | orr r12, r12, #0xba00 | ||
40 | mov r0, #0x5500 | ||
41 | str r0, [r12] | ||
42 | mov r0, #0x10000000 | ||
43 | orr r0, r0, #0x8000 | ||
44 | mov r4, r0 | ||
45 | ldr r2, =_end | ||
46 | 2: | ||
47 | ldr r3, [r1], #4 | ||
48 | str r3, [r0], #4 | ||
49 | teq r0, r2 | ||
50 | bne 2b | ||
51 | mov r0, #0xff00 | ||
52 | str r0, [r12] | ||
53 | 1: | ||
54 | mov r12, #0x03000000 @ point to LEDs | ||
55 | orr r12, r12, #0x00020000 | ||
56 | orr r12, r12, #0xba00 | ||
57 | mov r0, #0xfe00 | ||
58 | str r0, [r12] | ||
59 | |||
60 | adr lr, 1f | ||
61 | mov r0, #0 | ||
62 | mov r1, #14 /* MACH_TYPE_CLPS7500 */ | ||
63 | mov pc, lr | ||
64 | .Langel: | ||
65 | #ifdef CONFIG_ANGELBOOT | ||
66 | /* Call Angel to switch into SVC mode. */ | ||
67 | mov r0, #0x17 | ||
68 | swi 0x123456 | ||
69 | #endif | ||
70 | /* Ensure all interrupts are off and MMU disabled */ | ||
71 | mrs r0, cpsr | ||
72 | orr r0, r0, #0xc0 | ||
73 | msr cpsr_cxsf, r0 | ||
74 | |||
75 | adr lr, 1b | ||
76 | orr lr, lr, #0x10000000 | ||
77 | mov r0, #0x30 @ MMU off | ||
78 | mcr p15, 0, r0, c1, c0, 0 | ||
79 | mov r0, r0 | ||
80 | mov pc, lr | ||
81 | |||
82 | .ltorg | ||
83 | |||
84 | 1: | ||
85 | /* And the rest */ | ||
86 | #include "head.S" | ||
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 84a1e0496a3c..7b1f31295a0a 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -717,6 +717,9 @@ __armv7_mmu_cache_off: | |||
717 | bl __armv7_mmu_cache_flush | 717 | bl __armv7_mmu_cache_flush |
718 | mov r0, #0 | 718 | mov r0, #0 |
719 | mcr p15, 0, r0, c8, c7, 0 @ invalidate whole TLB | 719 | mcr p15, 0, r0, c8, c7, 0 @ invalidate whole TLB |
720 | mcr p15, 0, r0, c7, c5, 6 @ invalidate BTC | ||
721 | mcr p15, 0, r0, c7, c10, 4 @ DSB | ||
722 | mcr p15, 0, r0, c7, c5, 4 @ ISB | ||
720 | mov pc, r12 | 723 | mov pc, r12 |
721 | 724 | ||
722 | __arm6_mmu_cache_off: | 725 | __arm6_mmu_cache_off: |
@@ -778,12 +781,13 @@ __armv6_mmu_cache_flush: | |||
778 | __armv7_mmu_cache_flush: | 781 | __armv7_mmu_cache_flush: |
779 | mrc p15, 0, r10, c0, c1, 5 @ read ID_MMFR1 | 782 | mrc p15, 0, r10, c0, c1, 5 @ read ID_MMFR1 |
780 | tst r10, #0xf << 16 @ hierarchical cache (ARMv7) | 783 | tst r10, #0xf << 16 @ hierarchical cache (ARMv7) |
781 | beq hierarchical | ||
782 | mov r10, #0 | 784 | mov r10, #0 |
785 | beq hierarchical | ||
783 | mcr p15, 0, r10, c7, c14, 0 @ clean+invalidate D | 786 | mcr p15, 0, r10, c7, c14, 0 @ clean+invalidate D |
784 | b iflush | 787 | b iflush |
785 | hierarchical: | 788 | hierarchical: |
786 | stmfd sp!, {r0-r5, r7, r9-r11} | 789 | mcr p15, 0, r10, c7, c10, 5 @ DMB |
790 | stmfd sp!, {r0-r5, r7, r9, r11} | ||
787 | mrc p15, 1, r0, c0, c0, 1 @ read clidr | 791 | mrc p15, 1, r0, c0, c0, 1 @ read clidr |
788 | ands r3, r0, #0x7000000 @ extract loc from clidr | 792 | ands r3, r0, #0x7000000 @ extract loc from clidr |
789 | mov r3, r3, lsr #23 @ left align loc bit field | 793 | mov r3, r3, lsr #23 @ left align loc bit field |
@@ -820,12 +824,14 @@ skip: | |||
820 | cmp r3, r10 | 824 | cmp r3, r10 |
821 | bgt loop1 | 825 | bgt loop1 |
822 | finished: | 826 | finished: |
827 | ldmfd sp!, {r0-r5, r7, r9, r11} | ||
823 | mov r10, #0 @ swith back to cache level 0 | 828 | mov r10, #0 @ swith back to cache level 0 |
824 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr | 829 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr |
825 | ldmfd sp!, {r0-r5, r7, r9-r11} | ||
826 | iflush: | 830 | iflush: |
831 | mcr p15, 0, r10, c7, c10, 4 @ DSB | ||
827 | mcr p15, 0, r10, c7, c5, 0 @ invalidate I+BTB | 832 | mcr p15, 0, r10, c7, c5, 0 @ invalidate I+BTB |
828 | mcr p15, 0, r10, c7, c10, 4 @ drain WB | 833 | mcr p15, 0, r10, c7, c10, 4 @ DSB |
834 | mcr p15, 0, r10, c7, c5, 4 @ ISB | ||
829 | mov pc, lr | 835 | mov pc, lr |
830 | 836 | ||
831 | __armv5tej_mmu_cache_flush: | 837 | __armv5tej_mmu_cache_flush: |
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 65ce8fff29db..3fc08413fff0 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -86,6 +86,8 @@ static void putstr(const char *ptr) | |||
86 | 86 | ||
87 | #define __ptr_t void * | 87 | #define __ptr_t void * |
88 | 88 | ||
89 | #define memzero(s,n) __memzero(s,n) | ||
90 | |||
89 | /* | 91 | /* |
90 | * Optimised C version of memzero for the ARM. | 92 | * Optimised C version of memzero for the ARM. |
91 | */ | 93 | */ |
diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig index 86b5e6982660..a2cd9beaf37d 100644 --- a/arch/arm/common/Kconfig +++ b/arch/arm/common/Kconfig | |||
@@ -33,3 +33,6 @@ config SHARPSL_PM | |||
33 | 33 | ||
34 | config SHARP_SCOOP | 34 | config SHARP_SCOOP |
35 | bool | 35 | bool |
36 | |||
37 | config COMMON_CLKDEV | ||
38 | bool | ||
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index 325e4b6a6afb..7cb7961d81cb 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile | |||
@@ -17,3 +17,4 @@ obj-$(CONFIG_SHARP_SCOOP) += scoop.o | |||
17 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o | 17 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o |
18 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o | 18 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o |
19 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o | 19 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o |
20 | obj-$(CONFIG_COMMON_CLKDEV) += clkdev.o | ||
diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c new file mode 100644 index 000000000000..17a17b49a45b --- /dev/null +++ b/arch/arm/common/clkdev.c | |||
@@ -0,0 +1,128 @@ | |||
1 | /* | ||
2 | * arch/arm/common/clkdev.c | ||
3 | * | ||
4 | * Copyright (C) 2008 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Helper for the clk API to assist looking up a struct clk. | ||
11 | */ | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/device.h> | ||
15 | #include <linux/list.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/err.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/mutex.h> | ||
20 | |||
21 | #include <asm/clkdev.h> | ||
22 | #include <mach/clkdev.h> | ||
23 | |||
24 | static LIST_HEAD(clocks); | ||
25 | static DEFINE_MUTEX(clocks_mutex); | ||
26 | |||
27 | static struct clk *clk_find(const char *dev_id, const char *con_id) | ||
28 | { | ||
29 | struct clk_lookup *p; | ||
30 | struct clk *clk = NULL; | ||
31 | int match, best = 0; | ||
32 | |||
33 | list_for_each_entry(p, &clocks, node) { | ||
34 | if ((p->dev_id && !dev_id) || (p->con_id && !con_id)) | ||
35 | continue; | ||
36 | match = 0; | ||
37 | if (p->dev_id) | ||
38 | match += 2 * (strcmp(p->dev_id, dev_id) == 0); | ||
39 | if (p->con_id) | ||
40 | match += 1 * (strcmp(p->con_id, con_id) == 0); | ||
41 | if (match == 0) | ||
42 | continue; | ||
43 | |||
44 | if (match > best) { | ||
45 | clk = p->clk; | ||
46 | best = match; | ||
47 | } | ||
48 | } | ||
49 | return clk; | ||
50 | } | ||
51 | |||
52 | struct clk *clk_get(struct device *dev, const char *con_id) | ||
53 | { | ||
54 | const char *dev_id = dev ? dev_name(dev) : NULL; | ||
55 | struct clk *clk; | ||
56 | |||
57 | mutex_lock(&clocks_mutex); | ||
58 | clk = clk_find(dev_id, con_id); | ||
59 | if (clk && !__clk_get(clk)) | ||
60 | clk = NULL; | ||
61 | mutex_unlock(&clocks_mutex); | ||
62 | |||
63 | return clk ? clk : ERR_PTR(-ENOENT); | ||
64 | } | ||
65 | EXPORT_SYMBOL(clk_get); | ||
66 | |||
67 | void clk_put(struct clk *clk) | ||
68 | { | ||
69 | __clk_put(clk); | ||
70 | } | ||
71 | EXPORT_SYMBOL(clk_put); | ||
72 | |||
73 | void clkdev_add(struct clk_lookup *cl) | ||
74 | { | ||
75 | mutex_lock(&clocks_mutex); | ||
76 | list_add_tail(&cl->node, &clocks); | ||
77 | mutex_unlock(&clocks_mutex); | ||
78 | } | ||
79 | EXPORT_SYMBOL(clkdev_add); | ||
80 | |||
81 | #define MAX_DEV_ID 20 | ||
82 | #define MAX_CON_ID 16 | ||
83 | |||
84 | struct clk_lookup_alloc { | ||
85 | struct clk_lookup cl; | ||
86 | char dev_id[MAX_DEV_ID]; | ||
87 | char con_id[MAX_CON_ID]; | ||
88 | }; | ||
89 | |||
90 | struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id, | ||
91 | const char *dev_fmt, ...) | ||
92 | { | ||
93 | struct clk_lookup_alloc *cla; | ||
94 | |||
95 | cla = kzalloc(sizeof(*cla), GFP_KERNEL); | ||
96 | if (!cla) | ||
97 | return NULL; | ||
98 | |||
99 | cla->cl.clk = clk; | ||
100 | if (con_id) { | ||
101 | strlcpy(cla->con_id, con_id, sizeof(cla->con_id)); | ||
102 | cla->cl.con_id = cla->con_id; | ||
103 | } | ||
104 | |||
105 | if (dev_fmt) { | ||
106 | va_list ap; | ||
107 | |||
108 | va_start(ap, dev_fmt); | ||
109 | vscnprintf(cla->dev_id, sizeof(cla->dev_id), dev_fmt, ap); | ||
110 | cla->cl.dev_id = cla->dev_id; | ||
111 | va_end(ap); | ||
112 | } | ||
113 | |||
114 | return &cla->cl; | ||
115 | } | ||
116 | EXPORT_SYMBOL(clkdev_alloc); | ||
117 | |||
118 | /* | ||
119 | * clkdev_drop - remove a clock dynamically allocated | ||
120 | */ | ||
121 | void clkdev_drop(struct clk_lookup *cl) | ||
122 | { | ||
123 | mutex_lock(&clocks_mutex); | ||
124 | list_del(&cl->node); | ||
125 | mutex_unlock(&clocks_mutex); | ||
126 | kfree(cl); | ||
127 | } | ||
128 | EXPORT_SYMBOL(clkdev_drop); | ||
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index de6c59f814a1..85a2514cbffc 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <asm/glue.h> | 16 | #include <asm/glue.h> |
17 | #include <asm/shmparam.h> | 17 | #include <asm/shmparam.h> |
18 | #include <asm/cachetype.h> | ||
18 | 19 | ||
19 | #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) | 20 | #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) |
20 | 21 | ||
@@ -296,16 +297,6 @@ static inline void outer_flush_range(unsigned long start, unsigned long end) | |||
296 | #endif | 297 | #endif |
297 | 298 | ||
298 | /* | 299 | /* |
299 | * flush_cache_vmap() is used when creating mappings (eg, via vmap, | ||
300 | * vmalloc, ioremap etc) in kernel space for pages. Since the | ||
301 | * direct-mappings of these pages may contain cached data, we need | ||
302 | * to do a full cache flush to ensure that writebacks don't corrupt | ||
303 | * data placed into these pages via the new mappings. | ||
304 | */ | ||
305 | #define flush_cache_vmap(start, end) flush_cache_all() | ||
306 | #define flush_cache_vunmap(start, end) flush_cache_all() | ||
307 | |||
308 | /* | ||
309 | * Copy user data from/to a page which is mapped into a different | 300 | * Copy user data from/to a page which is mapped into a different |
310 | * processes address space. Really, we want to allow our "user | 301 | * processes address space. Really, we want to allow our "user |
311 | * space" model to handle this. | 302 | * space" model to handle this. |
@@ -444,4 +435,29 @@ static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt, | |||
444 | dmac_inv_range(start, start + size); | 435 | dmac_inv_range(start, start + size); |
445 | } | 436 | } |
446 | 437 | ||
438 | /* | ||
439 | * flush_cache_vmap() is used when creating mappings (eg, via vmap, | ||
440 | * vmalloc, ioremap etc) in kernel space for pages. On non-VIPT | ||
441 | * caches, since the direct-mappings of these pages may contain cached | ||
442 | * data, we need to do a full cache flush to ensure that writebacks | ||
443 | * don't corrupt data placed into these pages via the new mappings. | ||
444 | */ | ||
445 | static inline void flush_cache_vmap(unsigned long start, unsigned long end) | ||
446 | { | ||
447 | if (!cache_is_vipt_nonaliasing()) | ||
448 | flush_cache_all(); | ||
449 | else | ||
450 | /* | ||
451 | * set_pte_at() called from vmap_pte_range() does not | ||
452 | * have a DSB after cleaning the cache line. | ||
453 | */ | ||
454 | dsb(); | ||
455 | } | ||
456 | |||
457 | static inline void flush_cache_vunmap(unsigned long start, unsigned long end) | ||
458 | { | ||
459 | if (!cache_is_vipt_nonaliasing()) | ||
460 | flush_cache_all(); | ||
461 | } | ||
462 | |||
447 | #endif | 463 | #endif |
diff --git a/arch/arm/include/asm/clkdev.h b/arch/arm/include/asm/clkdev.h new file mode 100644 index 000000000000..b6ec7c627b39 --- /dev/null +++ b/arch/arm/include/asm/clkdev.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/clkdev.h | ||
3 | * | ||
4 | * Copyright (C) 2008 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Helper for the clk API to assist looking up a struct clk. | ||
11 | */ | ||
12 | #ifndef __ASM_CLKDEV_H | ||
13 | #define __ASM_CLKDEV_H | ||
14 | |||
15 | struct clk; | ||
16 | |||
17 | struct clk_lookup { | ||
18 | struct list_head node; | ||
19 | const char *dev_id; | ||
20 | const char *con_id; | ||
21 | struct clk *clk; | ||
22 | }; | ||
23 | |||
24 | struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id, | ||
25 | const char *dev_fmt, ...); | ||
26 | |||
27 | void clkdev_add(struct clk_lookup *cl); | ||
28 | void clkdev_drop(struct clk_lookup *cl); | ||
29 | |||
30 | #endif | ||
diff --git a/arch/arm/include/asm/hardware/iomd.h b/arch/arm/include/asm/hardware/iomd.h index 9c5afbd71a69..f9ee69e4f53e 100644 --- a/arch/arm/include/asm/hardware/iomd.h +++ b/arch/arm/include/asm/hardware/iomd.h | |||
@@ -32,19 +32,11 @@ | |||
32 | #define IOMD_KARTRX (0x004) | 32 | #define IOMD_KARTRX (0x004) |
33 | #define IOMD_KCTRL (0x008) | 33 | #define IOMD_KCTRL (0x008) |
34 | 34 | ||
35 | #ifdef CONFIG_ARCH_CLPS7500 | ||
36 | #define IOMD_IOLINES (0x00C) | ||
37 | #endif | ||
38 | |||
39 | #define IOMD_IRQSTATA (0x010) | 35 | #define IOMD_IRQSTATA (0x010) |
40 | #define IOMD_IRQREQA (0x014) | 36 | #define IOMD_IRQREQA (0x014) |
41 | #define IOMD_IRQCLRA (0x014) | 37 | #define IOMD_IRQCLRA (0x014) |
42 | #define IOMD_IRQMASKA (0x018) | 38 | #define IOMD_IRQMASKA (0x018) |
43 | 39 | ||
44 | #ifdef CONFIG_ARCH_CLPS7500 | ||
45 | #define IOMD_SUSMODE (0x01C) | ||
46 | #endif | ||
47 | |||
48 | #define IOMD_IRQSTATB (0x020) | 40 | #define IOMD_IRQSTATB (0x020) |
49 | #define IOMD_IRQREQB (0x024) | 41 | #define IOMD_IRQREQB (0x024) |
50 | #define IOMD_IRQMASKB (0x028) | 42 | #define IOMD_IRQMASKB (0x028) |
@@ -53,10 +45,6 @@ | |||
53 | #define IOMD_FIQREQ (0x034) | 45 | #define IOMD_FIQREQ (0x034) |
54 | #define IOMD_FIQMASK (0x038) | 46 | #define IOMD_FIQMASK (0x038) |
55 | 47 | ||
56 | #ifdef CONFIG_ARCH_CLPS7500 | ||
57 | #define IOMD_CLKCTL (0x03C) | ||
58 | #endif | ||
59 | |||
60 | #define IOMD_T0CNTL (0x040) | 48 | #define IOMD_T0CNTL (0x040) |
61 | #define IOMD_T0LTCHL (0x040) | 49 | #define IOMD_T0LTCHL (0x040) |
62 | #define IOMD_T0CNTH (0x044) | 50 | #define IOMD_T0CNTH (0x044) |
@@ -71,18 +59,6 @@ | |||
71 | #define IOMD_T1GO (0x058) | 59 | #define IOMD_T1GO (0x058) |
72 | #define IOMD_T1LATCH (0x05c) | 60 | #define IOMD_T1LATCH (0x05c) |
73 | 61 | ||
74 | #ifdef CONFIG_ARCH_CLPS7500 | ||
75 | #define IOMD_IRQSTATC (0x060) | ||
76 | #define IOMD_IRQREQC (0x064) | ||
77 | #define IOMD_IRQMASKC (0x068) | ||
78 | |||
79 | #define IOMD_VIDMUX (0x06c) | ||
80 | |||
81 | #define IOMD_IRQSTATD (0x070) | ||
82 | #define IOMD_IRQREQD (0x074) | ||
83 | #define IOMD_IRQMASKD (0x078) | ||
84 | #endif | ||
85 | |||
86 | #define IOMD_ROMCR0 (0x080) | 62 | #define IOMD_ROMCR0 (0x080) |
87 | #define IOMD_ROMCR1 (0x084) | 63 | #define IOMD_ROMCR1 (0x084) |
88 | #ifdef CONFIG_ARCH_RPC | 64 | #ifdef CONFIG_ARCH_RPC |
@@ -100,11 +76,6 @@ | |||
100 | #define IOMD_MOUSEY (0x0A4) | 76 | #define IOMD_MOUSEY (0x0A4) |
101 | #endif | 77 | #endif |
102 | 78 | ||
103 | #ifdef CONFIG_ARCH_CLPS7500 | ||
104 | #define IOMD_MSEDAT (0x0A8) | ||
105 | #define IOMD_MSECTL (0x0Ac) | ||
106 | #endif | ||
107 | |||
108 | #ifdef CONFIG_ARCH_RPC | 79 | #ifdef CONFIG_ARCH_RPC |
109 | #define IOMD_DMATCR (0x0C0) | 80 | #define IOMD_DMATCR (0x0C0) |
110 | #endif | 81 | #endif |
@@ -113,18 +84,6 @@ | |||
113 | #ifdef CONFIG_ARCH_RPC | 84 | #ifdef CONFIG_ARCH_RPC |
114 | #define IOMD_DMAEXT (0x0CC) | 85 | #define IOMD_DMAEXT (0x0CC) |
115 | #endif | 86 | #endif |
116 | #ifdef CONFIG_ARCH_CLPS7500 | ||
117 | #define IOMD_ASTCR (0x0CC) | ||
118 | #define IOMD_DRAMCR (0x0D0) | ||
119 | #define IOMD_SELFREF (0x0D4) | ||
120 | #define IOMD_ATODICR (0x0E0) | ||
121 | #define IOMD_ATODSR (0x0E4) | ||
122 | #define IOMD_ATODCC (0x0E8) | ||
123 | #define IOMD_ATODCNT1 (0x0EC) | ||
124 | #define IOMD_ATODCNT2 (0x0F0) | ||
125 | #define IOMD_ATODCNT3 (0x0F4) | ||
126 | #define IOMD_ATODCNT4 (0x0F8) | ||
127 | #endif | ||
128 | 87 | ||
129 | #ifdef CONFIG_ARCH_RPC | 88 | #ifdef CONFIG_ARCH_RPC |
130 | #define DMA_EXT_IO0 1 | 89 | #define DMA_EXT_IO0 1 |
diff --git a/arch/arm/include/asm/hwcap.h b/arch/arm/include/asm/hwcap.h index 81f4c899a555..bda489f9f017 100644 --- a/arch/arm/include/asm/hwcap.h +++ b/arch/arm/include/asm/hwcap.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #define HWCAP_IWMMXT 512 | 16 | #define HWCAP_IWMMXT 512 |
17 | #define HWCAP_CRUNCH 1024 | 17 | #define HWCAP_CRUNCH 1024 |
18 | #define HWCAP_THUMBEE 2048 | 18 | #define HWCAP_THUMBEE 2048 |
19 | #define HWCAP_NEON 4096 | ||
19 | 20 | ||
20 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) | 21 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) |
21 | /* | 22 | /* |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index 77747df713b4..f341c9dbd662 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -139,7 +139,7 @@ extern void __cpu_copy_user_highpage(struct page *to, struct page *from, | |||
139 | #define copy_user_highpage(to,from,vaddr,vma) \ | 139 | #define copy_user_highpage(to,from,vaddr,vma) \ |
140 | __cpu_copy_user_highpage(to, from, vaddr) | 140 | __cpu_copy_user_highpage(to, from, vaddr) |
141 | 141 | ||
142 | #define clear_page(page) memzero((void *)(page), PAGE_SIZE) | 142 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) |
143 | extern void copy_page(void *to, const void *from); | 143 | extern void copy_page(void *to, const void *from); |
144 | 144 | ||
145 | #undef STRICT_MM_TYPECHECKS | 145 | #undef STRICT_MM_TYPECHECKS |
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 517a4d6ffc74..2320508443a5 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -64,7 +64,7 @@ struct thread_struct { | |||
64 | ({ \ | 64 | ({ \ |
65 | unsigned long *stack = (unsigned long *)sp; \ | 65 | unsigned long *stack = (unsigned long *)sp; \ |
66 | set_fs(USER_DS); \ | 66 | set_fs(USER_DS); \ |
67 | memzero(regs->uregs, sizeof(regs->uregs)); \ | 67 | memset(regs->uregs, 0, sizeof(regs->uregs)); \ |
68 | if (current->personality & ADDR_LIMIT_32BIT) \ | 68 | if (current->personality & ADDR_LIMIT_32BIT) \ |
69 | regs->ARM_cpsr = USR_MODE; \ | 69 | regs->ARM_cpsr = USR_MODE; \ |
70 | else \ | 70 | else \ |
diff --git a/arch/arm/include/asm/string.h b/arch/arm/include/asm/string.h index e50c4a39b699..cf4f3aad0fc1 100644 --- a/arch/arm/include/asm/string.h +++ b/arch/arm/include/asm/string.h | |||
@@ -21,7 +21,6 @@ extern void * memmove(void *, const void *, __kernel_size_t); | |||
21 | #define __HAVE_ARCH_MEMCHR | 21 | #define __HAVE_ARCH_MEMCHR |
22 | extern void * memchr(const void *, int, __kernel_size_t); | 22 | extern void * memchr(const void *, int, __kernel_size_t); |
23 | 23 | ||
24 | #define __HAVE_ARCH_MEMZERO | ||
25 | #define __HAVE_ARCH_MEMSET | 24 | #define __HAVE_ARCH_MEMSET |
26 | extern void * memset(void *, int, __kernel_size_t); | 25 | extern void * memset(void *, int, __kernel_size_t); |
27 | 26 | ||
@@ -39,12 +38,4 @@ extern void __memzero(void *ptr, __kernel_size_t n); | |||
39 | (__p); \ | 38 | (__p); \ |
40 | }) | 39 | }) |
41 | 40 | ||
42 | #define memzero(p,n) \ | ||
43 | ({ \ | ||
44 | void *__p = (p); size_t __n = n; \ | ||
45 | if ((__n) != 0) \ | ||
46 | __memzero((__p),(__n)); \ | ||
47 | (__p); \ | ||
48 | }) | ||
49 | |||
50 | #endif | 41 | #endif |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index e98ec60b3400..cbb7a37e2978 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -400,7 +400,7 @@ static inline unsigned long __must_check copy_from_user(void *to, const void __u | |||
400 | if (access_ok(VERIFY_READ, from, n)) | 400 | if (access_ok(VERIFY_READ, from, n)) |
401 | n = __copy_from_user(to, from, n); | 401 | n = __copy_from_user(to, from, n); |
402 | else /* security hole - plug it */ | 402 | else /* security hole - plug it */ |
403 | memzero(to, n); | 403 | memset(to, 0, n); |
404 | return n; | 404 | return n; |
405 | } | 405 | } |
406 | 406 | ||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index d21786712c88..4f6ae06d0855 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -777,6 +777,8 @@ static const char *hwcap_str[] = { | |||
777 | "java", | 777 | "java", |
778 | "iwmmxt", | 778 | "iwmmxt", |
779 | "crunch", | 779 | "crunch", |
780 | "thumbee", | ||
781 | "neon", | ||
780 | NULL | 782 | NULL |
781 | }; | 783 | }; |
782 | 784 | ||
diff --git a/arch/arm/kernel/thumbee.c b/arch/arm/kernel/thumbee.c index df3f6b7ebcea..9cb7aaca159f 100644 --- a/arch/arm/kernel/thumbee.c +++ b/arch/arm/kernel/thumbee.c | |||
@@ -25,7 +25,7 @@ | |||
25 | /* | 25 | /* |
26 | * Access to the ThumbEE Handler Base register | 26 | * Access to the ThumbEE Handler Base register |
27 | */ | 27 | */ |
28 | static inline unsigned long teehbr_read() | 28 | static inline unsigned long teehbr_read(void) |
29 | { | 29 | { |
30 | unsigned long v; | 30 | unsigned long v; |
31 | asm("mrc p14, 6, %0, c1, c0, 0\n" : "=r" (v)); | 31 | asm("mrc p14, 6, %0, c1, c0, 0\n" : "=r" (v)); |
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 30351cd4560d..866f84a586ff 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile | |||
@@ -38,7 +38,6 @@ else | |||
38 | endif | 38 | endif |
39 | 39 | ||
40 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o | 40 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o |
41 | lib-$(CONFIG_ARCH_CLPS7500) += io-acorn.o | ||
42 | lib-$(CONFIG_ARCH_L7200) += io-acorn.o | 41 | lib-$(CONFIG_ARCH_L7200) += io-acorn.o |
43 | lib-$(CONFIG_ARCH_SHARK) += io-shark.o | 42 | lib-$(CONFIG_ARCH_SHARK) += io-shark.o |
44 | 43 | ||
diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S index 761eefa76243..650d5923ab83 100644 --- a/arch/arm/lib/memset.S +++ b/arch/arm/lib/memset.S | |||
@@ -25,7 +25,7 @@ | |||
25 | add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3)) | 25 | add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3)) |
26 | /* | 26 | /* |
27 | * The pointer is now aligned and the length is adjusted. Try doing the | 27 | * The pointer is now aligned and the length is adjusted. Try doing the |
28 | * memzero again. | 28 | * memset again. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | ENTRY(memset) | 31 | ENTRY(memset) |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 5aafb2e2ca7a..95dc71aaa668 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -7,36 +7,43 @@ choice | |||
7 | 7 | ||
8 | config ARCH_AT91RM9200 | 8 | config ARCH_AT91RM9200 |
9 | bool "AT91RM9200" | 9 | bool "AT91RM9200" |
10 | select CPU_ARM920T | ||
10 | select GENERIC_TIME | 11 | select GENERIC_TIME |
11 | select GENERIC_CLOCKEVENTS | 12 | select GENERIC_CLOCKEVENTS |
12 | 13 | ||
13 | config ARCH_AT91SAM9260 | 14 | config ARCH_AT91SAM9260 |
14 | bool "AT91SAM9260 or AT91SAM9XE" | 15 | bool "AT91SAM9260 or AT91SAM9XE" |
16 | select CPU_ARM926T | ||
15 | select GENERIC_TIME | 17 | select GENERIC_TIME |
16 | select GENERIC_CLOCKEVENTS | 18 | select GENERIC_CLOCKEVENTS |
17 | 19 | ||
18 | config ARCH_AT91SAM9261 | 20 | config ARCH_AT91SAM9261 |
19 | bool "AT91SAM9261" | 21 | bool "AT91SAM9261" |
22 | select CPU_ARM926T | ||
20 | select GENERIC_TIME | 23 | select GENERIC_TIME |
21 | select GENERIC_CLOCKEVENTS | 24 | select GENERIC_CLOCKEVENTS |
22 | 25 | ||
23 | config ARCH_AT91SAM9263 | 26 | config ARCH_AT91SAM9263 |
24 | bool "AT91SAM9263" | 27 | bool "AT91SAM9263" |
28 | select CPU_ARM926T | ||
25 | select GENERIC_TIME | 29 | select GENERIC_TIME |
26 | select GENERIC_CLOCKEVENTS | 30 | select GENERIC_CLOCKEVENTS |
27 | 31 | ||
28 | config ARCH_AT91SAM9RL | 32 | config ARCH_AT91SAM9RL |
29 | bool "AT91SAM9RL" | 33 | bool "AT91SAM9RL" |
34 | select CPU_ARM926T | ||
30 | select GENERIC_TIME | 35 | select GENERIC_TIME |
31 | select GENERIC_CLOCKEVENTS | 36 | select GENERIC_CLOCKEVENTS |
32 | 37 | ||
33 | config ARCH_AT91SAM9G20 | 38 | config ARCH_AT91SAM9G20 |
34 | bool "AT91SAM9G20" | 39 | bool "AT91SAM9G20" |
40 | select CPU_ARM926T | ||
35 | select GENERIC_TIME | 41 | select GENERIC_TIME |
36 | select GENERIC_CLOCKEVENTS | 42 | select GENERIC_CLOCKEVENTS |
37 | 43 | ||
38 | config ARCH_AT91CAP9 | 44 | config ARCH_AT91CAP9 |
39 | bool "AT91CAP9" | 45 | bool "AT91CAP9" |
46 | select CPU_ARM926T | ||
40 | select GENERIC_TIME | 47 | select GENERIC_TIME |
41 | select GENERIC_CLOCKEVENTS | 48 | select GENERIC_CLOCKEVENTS |
42 | 49 | ||
diff --git a/arch/arm/mach-clps7500/Makefile b/arch/arm/mach-clps7500/Makefile deleted file mode 100644 index 4bd8ebd70e7b..000000000000 --- a/arch/arm/mach-clps7500/Makefile +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | # Object file lists. | ||
6 | |||
7 | obj-y := core.o | ||
8 | obj-m := | ||
9 | obj-n := | ||
10 | obj- := | ||
11 | |||
diff --git a/arch/arm/mach-clps7500/Makefile.boot b/arch/arm/mach-clps7500/Makefile.boot deleted file mode 100644 index fe16506c1540..000000000000 --- a/arch/arm/mach-clps7500/Makefile.boot +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | zreladdr-y := 0x10008000 | ||
2 | |||
diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c deleted file mode 100644 index 7e247c04d41c..000000000000 --- a/arch/arm/mach-clps7500/core.c +++ /dev/null | |||
@@ -1,395 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps7500/core.c | ||
3 | * | ||
4 | * Copyright (C) 1998 Russell King | ||
5 | * Copyright (C) 1999 Nexus Electronics Ltd | ||
6 | * | ||
7 | * Extra MM routines for CL7500 architecture | ||
8 | */ | ||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/types.h> | ||
11 | #include <linux/interrupt.h> | ||
12 | #include <linux/irq.h> | ||
13 | #include <linux/list.h> | ||
14 | #include <linux/sched.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/device.h> | ||
17 | #include <linux/serial_8250.h> | ||
18 | #include <linux/io.h> | ||
19 | |||
20 | #include <asm/mach/arch.h> | ||
21 | #include <asm/mach/map.h> | ||
22 | #include <asm/mach/irq.h> | ||
23 | #include <asm/mach/time.h> | ||
24 | |||
25 | #include <mach/hardware.h> | ||
26 | #include <asm/hardware/iomd.h> | ||
27 | #include <asm/irq.h> | ||
28 | #include <asm/mach-types.h> | ||
29 | |||
30 | unsigned int vram_size; | ||
31 | |||
32 | static void cl7500_ack_irq_a(unsigned int irq) | ||
33 | { | ||
34 | unsigned int val, mask; | ||
35 | |||
36 | mask = 1 << irq; | ||
37 | val = iomd_readb(IOMD_IRQMASKA); | ||
38 | iomd_writeb(val & ~mask, IOMD_IRQMASKA); | ||
39 | iomd_writeb(mask, IOMD_IRQCLRA); | ||
40 | } | ||
41 | |||
42 | static void cl7500_mask_irq_a(unsigned int irq) | ||
43 | { | ||
44 | unsigned int val, mask; | ||
45 | |||
46 | mask = 1 << irq; | ||
47 | val = iomd_readb(IOMD_IRQMASKA); | ||
48 | iomd_writeb(val & ~mask, IOMD_IRQMASKA); | ||
49 | } | ||
50 | |||
51 | static void cl7500_unmask_irq_a(unsigned int irq) | ||
52 | { | ||
53 | unsigned int val, mask; | ||
54 | |||
55 | mask = 1 << irq; | ||
56 | val = iomd_readb(IOMD_IRQMASKA); | ||
57 | iomd_writeb(val | mask, IOMD_IRQMASKA); | ||
58 | } | ||
59 | |||
60 | static struct irq_chip clps7500_a_chip = { | ||
61 | .ack = cl7500_ack_irq_a, | ||
62 | .mask = cl7500_mask_irq_a, | ||
63 | .unmask = cl7500_unmask_irq_a, | ||
64 | }; | ||
65 | |||
66 | static void cl7500_mask_irq_b(unsigned int irq) | ||
67 | { | ||
68 | unsigned int val, mask; | ||
69 | |||
70 | mask = 1 << (irq & 7); | ||
71 | val = iomd_readb(IOMD_IRQMASKB); | ||
72 | iomd_writeb(val & ~mask, IOMD_IRQMASKB); | ||
73 | } | ||
74 | |||
75 | static void cl7500_unmask_irq_b(unsigned int irq) | ||
76 | { | ||
77 | unsigned int val, mask; | ||
78 | |||
79 | mask = 1 << (irq & 7); | ||
80 | val = iomd_readb(IOMD_IRQMASKB); | ||
81 | iomd_writeb(val | mask, IOMD_IRQMASKB); | ||
82 | } | ||
83 | |||
84 | static struct irq_chip clps7500_b_chip = { | ||
85 | .ack = cl7500_mask_irq_b, | ||
86 | .mask = cl7500_mask_irq_b, | ||
87 | .unmask = cl7500_unmask_irq_b, | ||
88 | }; | ||
89 | |||
90 | static void cl7500_mask_irq_c(unsigned int irq) | ||
91 | { | ||
92 | unsigned int val, mask; | ||
93 | |||
94 | mask = 1 << (irq & 7); | ||
95 | val = iomd_readb(IOMD_IRQMASKC); | ||
96 | iomd_writeb(val & ~mask, IOMD_IRQMASKC); | ||
97 | } | ||
98 | |||
99 | static void cl7500_unmask_irq_c(unsigned int irq) | ||
100 | { | ||
101 | unsigned int val, mask; | ||
102 | |||
103 | mask = 1 << (irq & 7); | ||
104 | val = iomd_readb(IOMD_IRQMASKC); | ||
105 | iomd_writeb(val | mask, IOMD_IRQMASKC); | ||
106 | } | ||
107 | |||
108 | static struct irq_chip clps7500_c_chip = { | ||
109 | .ack = cl7500_mask_irq_c, | ||
110 | .mask = cl7500_mask_irq_c, | ||
111 | .unmask = cl7500_unmask_irq_c, | ||
112 | }; | ||
113 | |||
114 | static void cl7500_mask_irq_d(unsigned int irq) | ||
115 | { | ||
116 | unsigned int val, mask; | ||
117 | |||
118 | mask = 1 << (irq & 7); | ||
119 | val = iomd_readb(IOMD_IRQMASKD); | ||
120 | iomd_writeb(val & ~mask, IOMD_IRQMASKD); | ||
121 | } | ||
122 | |||
123 | static void cl7500_unmask_irq_d(unsigned int irq) | ||
124 | { | ||
125 | unsigned int val, mask; | ||
126 | |||
127 | mask = 1 << (irq & 7); | ||
128 | val = iomd_readb(IOMD_IRQMASKD); | ||
129 | iomd_writeb(val | mask, IOMD_IRQMASKD); | ||
130 | } | ||
131 | |||
132 | static struct irq_chip clps7500_d_chip = { | ||
133 | .ack = cl7500_mask_irq_d, | ||
134 | .mask = cl7500_mask_irq_d, | ||
135 | .unmask = cl7500_unmask_irq_d, | ||
136 | }; | ||
137 | |||
138 | static void cl7500_mask_irq_dma(unsigned int irq) | ||
139 | { | ||
140 | unsigned int val, mask; | ||
141 | |||
142 | mask = 1 << (irq & 7); | ||
143 | val = iomd_readb(IOMD_DMAMASK); | ||
144 | iomd_writeb(val & ~mask, IOMD_DMAMASK); | ||
145 | } | ||
146 | |||
147 | static void cl7500_unmask_irq_dma(unsigned int irq) | ||
148 | { | ||
149 | unsigned int val, mask; | ||
150 | |||
151 | mask = 1 << (irq & 7); | ||
152 | val = iomd_readb(IOMD_DMAMASK); | ||
153 | iomd_writeb(val | mask, IOMD_DMAMASK); | ||
154 | } | ||
155 | |||
156 | static struct irq_chip clps7500_dma_chip = { | ||
157 | .ack = cl7500_mask_irq_dma, | ||
158 | .mask = cl7500_mask_irq_dma, | ||
159 | .unmask = cl7500_unmask_irq_dma, | ||
160 | }; | ||
161 | |||
162 | static void cl7500_mask_irq_fiq(unsigned int irq) | ||
163 | { | ||
164 | unsigned int val, mask; | ||
165 | |||
166 | mask = 1 << (irq & 7); | ||
167 | val = iomd_readb(IOMD_FIQMASK); | ||
168 | iomd_writeb(val & ~mask, IOMD_FIQMASK); | ||
169 | } | ||
170 | |||
171 | static void cl7500_unmask_irq_fiq(unsigned int irq) | ||
172 | { | ||
173 | unsigned int val, mask; | ||
174 | |||
175 | mask = 1 << (irq & 7); | ||
176 | val = iomd_readb(IOMD_FIQMASK); | ||
177 | iomd_writeb(val | mask, IOMD_FIQMASK); | ||
178 | } | ||
179 | |||
180 | static struct irq_chip clps7500_fiq_chip = { | ||
181 | .ack = cl7500_mask_irq_fiq, | ||
182 | .mask = cl7500_mask_irq_fiq, | ||
183 | .unmask = cl7500_unmask_irq_fiq, | ||
184 | }; | ||
185 | |||
186 | static void cl7500_no_action(unsigned int irq) | ||
187 | { | ||
188 | } | ||
189 | |||
190 | static struct irq_chip clps7500_no_chip = { | ||
191 | .ack = cl7500_no_action, | ||
192 | .mask = cl7500_no_action, | ||
193 | .unmask = cl7500_no_action, | ||
194 | }; | ||
195 | |||
196 | static struct irqaction irq_isa = { | ||
197 | .handler = no_action, | ||
198 | .mask = CPU_MASK_NONE, | ||
199 | .name = "isa", | ||
200 | }; | ||
201 | |||
202 | static void __init clps7500_init_irq(void) | ||
203 | { | ||
204 | unsigned int irq, flags; | ||
205 | |||
206 | iomd_writeb(0, IOMD_IRQMASKA); | ||
207 | iomd_writeb(0, IOMD_IRQMASKB); | ||
208 | iomd_writeb(0, IOMD_FIQMASK); | ||
209 | iomd_writeb(0, IOMD_DMAMASK); | ||
210 | |||
211 | for (irq = 0; irq < NR_IRQS; irq++) { | ||
212 | flags = IRQF_VALID; | ||
213 | |||
214 | if (irq <= 6 || (irq >= 9 && irq <= 15) || | ||
215 | (irq >= 48 && irq <= 55)) | ||
216 | flags |= IRQF_PROBE; | ||
217 | |||
218 | switch (irq) { | ||
219 | case 0 ... 7: | ||
220 | set_irq_chip(irq, &clps7500_a_chip); | ||
221 | set_irq_handler(irq, handle_level_irq); | ||
222 | set_irq_flags(irq, flags); | ||
223 | break; | ||
224 | |||
225 | case 8 ... 15: | ||
226 | set_irq_chip(irq, &clps7500_b_chip); | ||
227 | set_irq_handler(irq, handle_level_irq); | ||
228 | set_irq_flags(irq, flags); | ||
229 | break; | ||
230 | |||
231 | case 16 ... 22: | ||
232 | set_irq_chip(irq, &clps7500_dma_chip); | ||
233 | set_irq_handler(irq, handle_level_irq); | ||
234 | set_irq_flags(irq, flags); | ||
235 | break; | ||
236 | |||
237 | case 24 ... 31: | ||
238 | set_irq_chip(irq, &clps7500_c_chip); | ||
239 | set_irq_handler(irq, handle_level_irq); | ||
240 | set_irq_flags(irq, flags); | ||
241 | break; | ||
242 | |||
243 | case 40 ... 47: | ||
244 | set_irq_chip(irq, &clps7500_d_chip); | ||
245 | set_irq_handler(irq, handle_level_irq); | ||
246 | set_irq_flags(irq, flags); | ||
247 | break; | ||
248 | |||
249 | case 48 ... 55: | ||
250 | set_irq_chip(irq, &clps7500_no_chip); | ||
251 | set_irq_handler(irq, handle_level_irq); | ||
252 | set_irq_flags(irq, flags); | ||
253 | break; | ||
254 | |||
255 | case 64 ... 72: | ||
256 | set_irq_chip(irq, &clps7500_fiq_chip); | ||
257 | set_irq_handler(irq, handle_level_irq); | ||
258 | set_irq_flags(irq, flags); | ||
259 | break; | ||
260 | } | ||
261 | } | ||
262 | |||
263 | setup_irq(IRQ_ISA, &irq_isa); | ||
264 | } | ||
265 | |||
266 | static struct map_desc cl7500_io_desc[] __initdata = { | ||
267 | { /* IO space */ | ||
268 | .virtual = (unsigned long)IO_BASE, | ||
269 | .pfn = __phys_to_pfn(IO_START), | ||
270 | .length = IO_SIZE, | ||
271 | .type = MT_DEVICE | ||
272 | }, { /* ISA space */ | ||
273 | .virtual = ISA_BASE, | ||
274 | .pfn = __phys_to_pfn(ISA_START), | ||
275 | .length = ISA_SIZE, | ||
276 | .type = MT_DEVICE | ||
277 | }, { /* Flash */ | ||
278 | .virtual = CLPS7500_FLASH_BASE, | ||
279 | .pfn = __phys_to_pfn(CLPS7500_FLASH_START), | ||
280 | .length = CLPS7500_FLASH_SIZE, | ||
281 | .type = MT_DEVICE | ||
282 | }, { /* LED */ | ||
283 | .virtual = LED_BASE, | ||
284 | .pfn = __phys_to_pfn(LED_START), | ||
285 | .length = LED_SIZE, | ||
286 | .type = MT_DEVICE | ||
287 | } | ||
288 | }; | ||
289 | |||
290 | static void __init clps7500_map_io(void) | ||
291 | { | ||
292 | iotable_init(cl7500_io_desc, ARRAY_SIZE(cl7500_io_desc)); | ||
293 | } | ||
294 | |||
295 | extern void ioctime_init(void); | ||
296 | extern unsigned long ioc_timer_gettimeoffset(void); | ||
297 | |||
298 | static irqreturn_t | ||
299 | clps7500_timer_interrupt(int irq, void *dev_id) | ||
300 | { | ||
301 | timer_tick(); | ||
302 | |||
303 | /* Why not using do_leds interface?? */ | ||
304 | { | ||
305 | /* Twinkle the lights. */ | ||
306 | static int count, state = 0xff00; | ||
307 | if (count-- == 0) { | ||
308 | state ^= 0x100; | ||
309 | count = 25; | ||
310 | *((volatile unsigned int *)LED_ADDRESS) = state; | ||
311 | } | ||
312 | } | ||
313 | |||
314 | return IRQ_HANDLED; | ||
315 | } | ||
316 | |||
317 | static struct irqaction clps7500_timer_irq = { | ||
318 | .name = "CLPS7500 Timer Tick", | ||
319 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
320 | .handler = clps7500_timer_interrupt, | ||
321 | }; | ||
322 | |||
323 | /* | ||
324 | * Set up timer interrupt. | ||
325 | */ | ||
326 | static void __init clps7500_timer_init(void) | ||
327 | { | ||
328 | ioctime_init(); | ||
329 | setup_irq(IRQ_TIMER, &clps7500_timer_irq); | ||
330 | } | ||
331 | |||
332 | static struct sys_timer clps7500_timer = { | ||
333 | .init = clps7500_timer_init, | ||
334 | .offset = ioc_timer_gettimeoffset, | ||
335 | }; | ||
336 | |||
337 | static struct plat_serial8250_port serial_platform_data[] = { | ||
338 | { | ||
339 | .mapbase = 0x03010fe0, | ||
340 | .irq = 10, | ||
341 | .uartclk = 1843200, | ||
342 | .regshift = 2, | ||
343 | .iotype = UPIO_MEM, | ||
344 | .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SKIP_TEST, | ||
345 | }, | ||
346 | { | ||
347 | .mapbase = 0x03010be0, | ||
348 | .irq = 0, | ||
349 | .uartclk = 1843200, | ||
350 | .regshift = 2, | ||
351 | .iotype = UPIO_MEM, | ||
352 | .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SKIP_TEST, | ||
353 | }, | ||
354 | { | ||
355 | .iobase = ISASLOT_IO + 0x2e8, | ||
356 | .irq = 41, | ||
357 | .uartclk = 1843200, | ||
358 | .regshift = 0, | ||
359 | .iotype = UPIO_PORT, | ||
360 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
361 | }, | ||
362 | { | ||
363 | .iobase = ISASLOT_IO + 0x3e8, | ||
364 | .irq = 40, | ||
365 | .uartclk = 1843200, | ||
366 | .regshift = 0, | ||
367 | .iotype = UPIO_PORT, | ||
368 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
369 | }, | ||
370 | { }, | ||
371 | }; | ||
372 | |||
373 | static struct platform_device serial_device = { | ||
374 | .name = "serial8250", | ||
375 | .id = PLAT8250_DEV_PLATFORM, | ||
376 | .dev = { | ||
377 | .platform_data = serial_platform_data, | ||
378 | }, | ||
379 | }; | ||
380 | |||
381 | static void __init clps7500_init(void) | ||
382 | { | ||
383 | platform_device_register(&serial_device); | ||
384 | } | ||
385 | |||
386 | MACHINE_START(CLPS7500, "CL-PS7500") | ||
387 | /* Maintainer: Philip Blundell */ | ||
388 | .phys_io = 0x03000000, | ||
389 | .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc, | ||
390 | .map_io = clps7500_map_io, | ||
391 | .init_irq = clps7500_init_irq, | ||
392 | .init_machine = clps7500_init, | ||
393 | .timer = &clps7500_timer, | ||
394 | MACHINE_END | ||
395 | |||
diff --git a/arch/arm/mach-clps7500/include/mach/acornfb.h b/arch/arm/mach-clps7500/include/mach/acornfb.h deleted file mode 100644 index aea6330c9745..000000000000 --- a/arch/arm/mach-clps7500/include/mach/acornfb.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | #define acornfb_valid_pixrate(var) (var->pixclock >= 39325 && var->pixclock <= 40119) | ||
2 | |||
3 | static inline void | ||
4 | acornfb_vidc20_find_rates(struct vidc_timing *vidc, | ||
5 | struct fb_var_screeninfo *var) | ||
6 | { | ||
7 | u_int bandwidth; | ||
8 | |||
9 | vidc->control |= VIDC20_CTRL_PIX_CK; | ||
10 | |||
11 | /* Calculate bandwidth */ | ||
12 | bandwidth = var->pixclock * 8 / var->bits_per_pixel; | ||
13 | |||
14 | /* Encode bandwidth as VIDC20 setting */ | ||
15 | if (bandwidth > 16667*2) | ||
16 | vidc->control |= VIDC20_CTRL_FIFO_16; | ||
17 | else if (bandwidth > 13333*2) | ||
18 | vidc->control |= VIDC20_CTRL_FIFO_20; | ||
19 | else if (bandwidth > 11111*2) | ||
20 | vidc->control |= VIDC20_CTRL_FIFO_24; | ||
21 | else | ||
22 | vidc->control |= VIDC20_CTRL_FIFO_28; | ||
23 | |||
24 | vidc->pll_ctl = 0x2020; | ||
25 | } | ||
26 | |||
27 | #ifdef CONFIG_CHRONTEL_7003 | ||
28 | #define acornfb_default_control() VIDC20_CTRL_PIX_HCLK | ||
29 | #else | ||
30 | #define acornfb_default_control() VIDC20_CTRL_PIX_VCLK | ||
31 | #endif | ||
32 | |||
33 | #define acornfb_default_econtrol() VIDC20_ECTL_DAC | VIDC20_ECTL_REG(3) | VIDC20_ECTL_ECK | ||
diff --git a/arch/arm/mach-clps7500/include/mach/debug-macro.S b/arch/arm/mach-clps7500/include/mach/debug-macro.S deleted file mode 100644 index af4104e7e84a..000000000000 --- a/arch/arm/mach-clps7500/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* arch/arm/mach-clps7500/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | .macro addruart,rx | ||
15 | mov \rx, #0xe0000000 | ||
16 | orr \rx, \rx, #0x00010000 | ||
17 | orr \rx, \rx, #0x00000be0 | ||
18 | .endm | ||
19 | |||
20 | #define UART_SHIFT 2 | ||
21 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-clps7500/include/mach/dma.h b/arch/arm/mach-clps7500/include/mach/dma.h deleted file mode 100644 index 63fcde505498..000000000000 --- a/arch/arm/mach-clps7500/include/mach/dma.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 1999 Nexus Electronics Ltd. | ||
5 | */ | ||
6 | |||
7 | #ifndef __ASM_ARCH_DMA_H | ||
8 | #define __ASM_ARCH_DMA_H | ||
9 | |||
10 | /* DMA is not yet implemented! It should be the same as acorn, copy over.. */ | ||
11 | |||
12 | /* | ||
13 | * This is the maximum DMA address that can be DMAd to. | ||
14 | * There should not be more than (0xd0000000 - 0xc0000000) | ||
15 | * bytes of RAM. | ||
16 | */ | ||
17 | #define MAX_DMA_ADDRESS 0xd0000000 | ||
18 | |||
19 | #define DMA_S0 0 | ||
20 | |||
21 | #endif /* _ASM_ARCH_DMA_H */ | ||
diff --git a/arch/arm/mach-clps7500/include/mach/entry-macro.S b/arch/arm/mach-clps7500/include/mach/entry-macro.S deleted file mode 100644 index 4e7e54144093..000000000000 --- a/arch/arm/mach-clps7500/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #include <mach/hardware.h> | ||
2 | #include <asm/hardware/entry-macro-iomd.S> | ||
3 | |||
4 | .equ ioc_base_high, IOC_BASE & 0xff000000 | ||
5 | .equ ioc_base_low, IOC_BASE & 0x00ff0000 | ||
6 | |||
7 | .macro get_irqnr_preamble, base, tmp | ||
8 | mov \base, #ioc_base_high @ point at IOC | ||
9 | .if ioc_base_low | ||
10 | orr \base, \base, #ioc_base_low | ||
11 | .endif | ||
12 | .endm | ||
13 | |||
14 | .macro arch_ret_to_user, tmp1, tmp2 | ||
15 | .endm | ||
16 | |||
diff --git a/arch/arm/mach-clps7500/include/mach/hardware.h b/arch/arm/mach-clps7500/include/mach/hardware.h deleted file mode 100644 index a6ad1d44badf..000000000000 --- a/arch/arm/mach-clps7500/include/mach/hardware.h +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/hardware.h | ||
3 | * | ||
4 | * Copyright (C) 1996-1999 Russell King. | ||
5 | * Copyright (C) 1999 Nexus Electronics Ltd. | ||
6 | * | ||
7 | * This file contains the hardware definitions of the | ||
8 | * CL7500 evaluation board. | ||
9 | */ | ||
10 | #ifndef __ASM_ARCH_HARDWARE_H | ||
11 | #define __ASM_ARCH_HARDWARE_H | ||
12 | |||
13 | #include <mach/memory.h> | ||
14 | #include <asm/hardware/iomd.h> | ||
15 | |||
16 | #ifdef __ASSEMBLY__ | ||
17 | #define IOMEM(x) x | ||
18 | #else | ||
19 | #define IOMEM(x) ((void __iomem *)(x)) | ||
20 | #endif | ||
21 | |||
22 | /* | ||
23 | * What hardware must be present | ||
24 | */ | ||
25 | #define HAS_IOMD | ||
26 | #define HAS_VIDC20 | ||
27 | |||
28 | /* Hardware addresses of major areas. | ||
29 | * *_START is the physical address | ||
30 | * *_SIZE is the size of the region | ||
31 | * *_BASE is the virtual address | ||
32 | */ | ||
33 | |||
34 | #define IO_START 0x03000000 /* I/O */ | ||
35 | #define IO_SIZE 0x01000000 | ||
36 | #define IO_BASE IOMEM(0xe0000000) | ||
37 | |||
38 | #define ISA_START 0x0c000000 /* ISA */ | ||
39 | #define ISA_SIZE 0x00010000 | ||
40 | #define ISA_BASE 0xe1000000 | ||
41 | |||
42 | #define CLPS7500_FLASH_START 0x01000000 /* XXX */ | ||
43 | #define CLPS7500_FLASH_SIZE 0x01000000 | ||
44 | #define CLPS7500_FLASH_BASE 0xe2000000 | ||
45 | |||
46 | #define LED_START 0x0302B000 | ||
47 | #define LED_SIZE 0x00001000 | ||
48 | #define LED_BASE 0xe3000000 | ||
49 | #define LED_ADDRESS (LED_BASE + 0xa00) | ||
50 | |||
51 | /* Let's define SCREEN_START for CL7500, even though it's a lie. */ | ||
52 | #define SCREEN_START 0x02000000 /* VRAM */ | ||
53 | #define SCREEN_END 0xdfc00000 | ||
54 | #define SCREEN_BASE 0xdf800000 | ||
55 | |||
56 | #define VIDC_BASE (void __iomem *)0xe0400000 | ||
57 | #define IOMD_BASE IOMEM(0xe0200000) | ||
58 | #define IOC_BASE IOMEM(0xe0200000) | ||
59 | #define FLOPPYDMA_BASE IOMEM(0xe002a000) | ||
60 | #define PCIO_BASE IOMEM(0xe0010000) | ||
61 | |||
62 | #define vidc_writel(val) __raw_writel(val, VIDC_BASE) | ||
63 | |||
64 | /* in/out bias for the ISA slot region */ | ||
65 | #define ISASLOT_IO 0x80400000 | ||
66 | |||
67 | #endif | ||
diff --git a/arch/arm/mach-clps7500/include/mach/io.h b/arch/arm/mach-clps7500/include/mach/io.h deleted file mode 100644 index 2ff2860889ed..000000000000 --- a/arch/arm/mach-clps7500/include/mach/io.h +++ /dev/null | |||
@@ -1,255 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/io.h | ||
3 | * from arch/arm/mach-rpc/include/mach/io.h | ||
4 | * | ||
5 | * Copyright (C) 1997 Russell King | ||
6 | * | ||
7 | * Modifications: | ||
8 | * 06-Dec-1997 RMK Created. | ||
9 | */ | ||
10 | #ifndef __ASM_ARM_ARCH_IO_H | ||
11 | #define __ASM_ARM_ARCH_IO_H | ||
12 | |||
13 | #include <mach/hardware.h> | ||
14 | |||
15 | #define IO_SPACE_LIMIT 0xffffffff | ||
16 | |||
17 | /* | ||
18 | * GCC is totally crap at loading/storing data. We try to persuade it | ||
19 | * to do the right thing by using these whereever possible instead of | ||
20 | * the above. | ||
21 | */ | ||
22 | #define __arch_base_getb(b,o) \ | ||
23 | ({ \ | ||
24 | unsigned int v, r = (b); \ | ||
25 | __asm__ __volatile__( \ | ||
26 | "ldrb %0, [%1, %2]" \ | ||
27 | : "=r" (v) \ | ||
28 | : "r" (r), "Ir" (o)); \ | ||
29 | v; \ | ||
30 | }) | ||
31 | |||
32 | #define __arch_base_getl(b,o) \ | ||
33 | ({ \ | ||
34 | unsigned int v, r = (b); \ | ||
35 | __asm__ __volatile__( \ | ||
36 | "ldr %0, [%1, %2]" \ | ||
37 | : "=r" (v) \ | ||
38 | : "r" (r), "Ir" (o)); \ | ||
39 | v; \ | ||
40 | }) | ||
41 | |||
42 | #define __arch_base_putb(v,b,o) \ | ||
43 | ({ \ | ||
44 | unsigned int r = (b); \ | ||
45 | __asm__ __volatile__( \ | ||
46 | "strb %0, [%1, %2]" \ | ||
47 | : \ | ||
48 | : "r" (v), "r" (r), "Ir" (o)); \ | ||
49 | }) | ||
50 | |||
51 | #define __arch_base_putl(v,b,o) \ | ||
52 | ({ \ | ||
53 | unsigned int r = (b); \ | ||
54 | __asm__ __volatile__( \ | ||
55 | "str %0, [%1, %2]" \ | ||
56 | : \ | ||
57 | : "r" (v), "r" (r), "Ir" (o)); \ | ||
58 | }) | ||
59 | |||
60 | /* | ||
61 | * We use two different types of addressing - PC style addresses, and ARM | ||
62 | * addresses. PC style accesses the PC hardware with the normal PC IO | ||
63 | * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+ | ||
64 | * and are translated to the start of IO. Note that all addresses are | ||
65 | * shifted left! | ||
66 | */ | ||
67 | #define __PORT_PCIO(x) (!((x) & 0x80000000)) | ||
68 | |||
69 | /* | ||
70 | * Dynamic IO functions - let the compiler | ||
71 | * optimize the expressions | ||
72 | */ | ||
73 | static inline void __outb (unsigned int value, unsigned int port) | ||
74 | { | ||
75 | unsigned long temp; | ||
76 | __asm__ __volatile__( | ||
77 | "tst %2, #0x80000000\n\t" | ||
78 | "mov %0, %4\n\t" | ||
79 | "addeq %0, %0, %3\n\t" | ||
80 | "strb %1, [%0, %2, lsl #2] @ outb" | ||
81 | : "=&r" (temp) | ||
82 | : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) | ||
83 | : "cc"); | ||
84 | } | ||
85 | |||
86 | static inline void __outw (unsigned int value, unsigned int port) | ||
87 | { | ||
88 | unsigned long temp; | ||
89 | __asm__ __volatile__( | ||
90 | "tst %2, #0x80000000\n\t" | ||
91 | "mov %0, %4\n\t" | ||
92 | "addeq %0, %0, %3\n\t" | ||
93 | "str %1, [%0, %2, lsl #2] @ outw" | ||
94 | : "=&r" (temp) | ||
95 | : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) | ||
96 | : "cc"); | ||
97 | } | ||
98 | |||
99 | static inline void __outl (unsigned int value, unsigned int port) | ||
100 | { | ||
101 | unsigned long temp; | ||
102 | __asm__ __volatile__( | ||
103 | "tst %2, #0x80000000\n\t" | ||
104 | "mov %0, %4\n\t" | ||
105 | "addeq %0, %0, %3\n\t" | ||
106 | "str %1, [%0, %2, lsl #2] @ outl" | ||
107 | : "=&r" (temp) | ||
108 | : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) | ||
109 | : "cc"); | ||
110 | } | ||
111 | |||
112 | #define DECLARE_DYN_IN(sz,fnsuffix,instr) \ | ||
113 | static inline unsigned sz __in##fnsuffix (unsigned int port) \ | ||
114 | { \ | ||
115 | unsigned long temp, value; \ | ||
116 | __asm__ __volatile__( \ | ||
117 | "tst %2, #0x80000000\n\t" \ | ||
118 | "mov %0, %4\n\t" \ | ||
119 | "addeq %0, %0, %3\n\t" \ | ||
120 | "ldr" instr " %1, [%0, %2, lsl #2] @ in" #fnsuffix \ | ||
121 | : "=&r" (temp), "=r" (value) \ | ||
122 | : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \ | ||
123 | : "cc"); \ | ||
124 | return (unsigned sz)value; \ | ||
125 | } | ||
126 | |||
127 | static inline unsigned int __ioaddr (unsigned int port) \ | ||
128 | { \ | ||
129 | if (__PORT_PCIO(port)) \ | ||
130 | return (unsigned int)(PCIO_BASE + (port << 2)); \ | ||
131 | else \ | ||
132 | return (unsigned int)(IO_BASE + (port << 2)); \ | ||
133 | } | ||
134 | |||
135 | #define DECLARE_IO(sz,fnsuffix,instr) \ | ||
136 | DECLARE_DYN_IN(sz,fnsuffix,instr) | ||
137 | |||
138 | DECLARE_IO(char,b,"b") | ||
139 | DECLARE_IO(short,w,"") | ||
140 | DECLARE_IO(int,l,"") | ||
141 | |||
142 | #undef DECLARE_IO | ||
143 | #undef DECLARE_DYN_IN | ||
144 | |||
145 | /* | ||
146 | * Constant address IO functions | ||
147 | * | ||
148 | * These have to be macros for the 'J' constraint to work - | ||
149 | * +/-4096 immediate operand. | ||
150 | */ | ||
151 | #define __outbc(value,port) \ | ||
152 | ({ \ | ||
153 | if (__PORT_PCIO((port))) \ | ||
154 | __asm__ __volatile__( \ | ||
155 | "strb %0, [%1, %2] @ outbc" \ | ||
156 | : : "r" (value), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
157 | else \ | ||
158 | __asm__ __volatile__( \ | ||
159 | "strb %0, [%1, %2] @ outbc" \ | ||
160 | : : "r" (value), "r" (IO_BASE), "r" ((port) << 2)); \ | ||
161 | }) | ||
162 | |||
163 | #define __inbc(port) \ | ||
164 | ({ \ | ||
165 | unsigned char result; \ | ||
166 | if (__PORT_PCIO((port))) \ | ||
167 | __asm__ __volatile__( \ | ||
168 | "ldrb %0, [%1, %2] @ inbc" \ | ||
169 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
170 | else \ | ||
171 | __asm__ __volatile__( \ | ||
172 | "ldrb %0, [%1, %2] @ inbc" \ | ||
173 | : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ | ||
174 | result; \ | ||
175 | }) | ||
176 | |||
177 | #define __outwc(value,port) \ | ||
178 | ({ \ | ||
179 | unsigned long v = value; \ | ||
180 | if (__PORT_PCIO((port))) \ | ||
181 | __asm__ __volatile__( \ | ||
182 | "str %0, [%1, %2] @ outwc" \ | ||
183 | : : "r" (v|v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
184 | else \ | ||
185 | __asm__ __volatile__( \ | ||
186 | "str %0, [%1, %2] @ outwc" \ | ||
187 | : : "r" (v|v<<16), "r" (IO_BASE), "r" ((port) << 2)); \ | ||
188 | }) | ||
189 | |||
190 | #define __inwc(port) \ | ||
191 | ({ \ | ||
192 | unsigned short result; \ | ||
193 | if (__PORT_PCIO((port))) \ | ||
194 | __asm__ __volatile__( \ | ||
195 | "ldr %0, [%1, %2] @ inwc" \ | ||
196 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
197 | else \ | ||
198 | __asm__ __volatile__( \ | ||
199 | "ldr %0, [%1, %2] @ inwc" \ | ||
200 | : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ | ||
201 | result & 0xffff; \ | ||
202 | }) | ||
203 | |||
204 | #define __outlc(value,port) \ | ||
205 | ({ \ | ||
206 | unsigned long v = value; \ | ||
207 | if (__PORT_PCIO((port))) \ | ||
208 | __asm__ __volatile__( \ | ||
209 | "str %0, [%1, %2] @ outlc" \ | ||
210 | : : "r" (v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
211 | else \ | ||
212 | __asm__ __volatile__( \ | ||
213 | "str %0, [%1, %2] @ outlc" \ | ||
214 | : : "r" (v), "r" (IO_BASE), "r" ((port) << 2)); \ | ||
215 | }) | ||
216 | |||
217 | #define __inlc(port) \ | ||
218 | ({ \ | ||
219 | unsigned long result; \ | ||
220 | if (__PORT_PCIO((port))) \ | ||
221 | __asm__ __volatile__( \ | ||
222 | "ldr %0, [%1, %2] @ inlc" \ | ||
223 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
224 | else \ | ||
225 | __asm__ __volatile__( \ | ||
226 | "ldr %0, [%1, %2] @ inlc" \ | ||
227 | : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ | ||
228 | result; \ | ||
229 | }) | ||
230 | |||
231 | #define __ioaddrc(port) \ | ||
232 | (__PORT_PCIO((port)) ? PCIO_BASE + ((port) << 2) : IO_BASE + ((port) << 2)) | ||
233 | |||
234 | #define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p)) | ||
235 | #define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p)) | ||
236 | #define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p)) | ||
237 | #define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p)) | ||
238 | #define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p)) | ||
239 | #define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p)) | ||
240 | #define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p)) | ||
241 | /* the following macro is deprecated */ | ||
242 | #define ioaddr(port) __ioaddr((port)) | ||
243 | |||
244 | #define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l) | ||
245 | #define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l) | ||
246 | |||
247 | #define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l) | ||
248 | #define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l) | ||
249 | |||
250 | /* | ||
251 | * 1:1 mapping for ioremapped regions. | ||
252 | */ | ||
253 | #define __mem_pci(x) (x) | ||
254 | |||
255 | #endif | ||
diff --git a/arch/arm/mach-clps7500/include/mach/irq.h b/arch/arm/mach-clps7500/include/mach/irq.h deleted file mode 100644 index d02fcf28ee05..000000000000 --- a/arch/arm/mach-clps7500/include/mach/irq.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/irq.h | ||
3 | * | ||
4 | * Copyright (C) 1996 Russell King | ||
5 | * Copyright (C) 1999, 2001 Nexus Electronics Ltd. | ||
6 | * | ||
7 | * Changelog: | ||
8 | * 10-10-1996 RMK Brought up to date with arch-sa110eval | ||
9 | * 22-08-1998 RMK Restructured IRQ routines | ||
10 | * 11-08-1999 PJB Created ARM7500 version, derived from RiscPC code | ||
11 | */ | ||
12 | |||
13 | #include <linux/io.h> | ||
14 | #include <asm/hardware/iomd.h> | ||
15 | |||
16 | static inline int fixup_irq(unsigned int irq) | ||
17 | { | ||
18 | if (irq == IRQ_ISA) { | ||
19 | int isabits = *((volatile unsigned int *)0xe002b700); | ||
20 | if (isabits == 0) { | ||
21 | printk("Spurious ISA IRQ!\n"); | ||
22 | return irq; | ||
23 | } | ||
24 | irq = IRQ_ISA_BASE; | ||
25 | while (!(isabits & 1)) { | ||
26 | irq++; | ||
27 | isabits >>= 1; | ||
28 | } | ||
29 | } | ||
30 | |||
31 | return irq; | ||
32 | } | ||
diff --git a/arch/arm/mach-clps7500/include/mach/irqs.h b/arch/arm/mach-clps7500/include/mach/irqs.h deleted file mode 100644 index bee66b487f59..000000000000 --- a/arch/arm/mach-clps7500/include/mach/irqs.h +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/irqs.h | ||
3 | * | ||
4 | * Copyright (C) 1999 Nexus Electronics Ltd | ||
5 | */ | ||
6 | |||
7 | #define IRQ_INT2 0 | ||
8 | #define IRQ_INT1 2 | ||
9 | #define IRQ_VSYNCPULSE 3 | ||
10 | #define IRQ_POWERON 4 | ||
11 | #define IRQ_TIMER0 5 | ||
12 | #define IRQ_TIMER1 6 | ||
13 | #define IRQ_FORCE 7 | ||
14 | #define IRQ_INT8 8 | ||
15 | #define IRQ_ISA 9 | ||
16 | #define IRQ_INT6 10 | ||
17 | #define IRQ_INT5 11 | ||
18 | #define IRQ_INT4 12 | ||
19 | #define IRQ_INT3 13 | ||
20 | #define IRQ_KEYBOARDTX 14 | ||
21 | #define IRQ_KEYBOARDRX 15 | ||
22 | |||
23 | #define IRQ_DMA0 16 | ||
24 | #define IRQ_DMA1 17 | ||
25 | #define IRQ_DMA2 18 | ||
26 | #define IRQ_DMA3 19 | ||
27 | #define IRQ_DMAS0 20 | ||
28 | #define IRQ_DMAS1 21 | ||
29 | |||
30 | #define IRQ_IOP0 24 | ||
31 | #define IRQ_IOP1 25 | ||
32 | #define IRQ_IOP2 26 | ||
33 | #define IRQ_IOP3 27 | ||
34 | #define IRQ_IOP4 28 | ||
35 | #define IRQ_IOP5 29 | ||
36 | #define IRQ_IOP6 30 | ||
37 | #define IRQ_IOP7 31 | ||
38 | |||
39 | #define IRQ_MOUSERX 40 | ||
40 | #define IRQ_MOUSETX 41 | ||
41 | #define IRQ_ADC 42 | ||
42 | #define IRQ_EVENT1 43 | ||
43 | #define IRQ_EVENT2 44 | ||
44 | |||
45 | #define IRQ_ISA_BASE 48 | ||
46 | #define IRQ_ISA_3 48 | ||
47 | #define IRQ_ISA_4 49 | ||
48 | #define IRQ_ISA_5 50 | ||
49 | #define IRQ_ISA_7 51 | ||
50 | #define IRQ_ISA_9 52 | ||
51 | #define IRQ_ISA_10 53 | ||
52 | #define IRQ_ISA_11 54 | ||
53 | #define IRQ_ISA_14 55 | ||
54 | |||
55 | #define FIQ_INT9 0 | ||
56 | #define FIQ_INT5 1 | ||
57 | #define FIQ_INT6 4 | ||
58 | #define FIQ_INT8 6 | ||
59 | #define FIQ_FORCE 7 | ||
60 | |||
61 | /* | ||
62 | * This is the offset of the FIQ "IRQ" numbers | ||
63 | */ | ||
64 | #define FIQ_START 64 | ||
65 | |||
66 | #define IRQ_TIMER IRQ_TIMER0 | ||
diff --git a/arch/arm/mach-clps7500/include/mach/memory.h b/arch/arm/mach-clps7500/include/mach/memory.h deleted file mode 100644 index 05ea76b6a2d0..000000000000 --- a/arch/arm/mach-clps7500/include/mach/memory.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 1996,1997,1998 Russell King. | ||
5 | * | ||
6 | * Changelog: | ||
7 | * 20-Oct-1996 RMK Created | ||
8 | * 31-Dec-1997 RMK Fixed definitions to reduce warnings | ||
9 | * 11-Jan-1998 RMK Uninlined to reduce hits on cache | ||
10 | * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt | ||
11 | * 21-Mar-1999 RMK Renamed to memory.h | ||
12 | * RMK Added TASK_SIZE and PAGE_OFFSET | ||
13 | */ | ||
14 | #ifndef __ASM_ARCH_MEMORY_H | ||
15 | #define __ASM_ARCH_MEMORY_H | ||
16 | |||
17 | /* | ||
18 | * Physical DRAM offset. | ||
19 | */ | ||
20 | #define PHYS_OFFSET UL(0x10000000) | ||
21 | |||
22 | /* | ||
23 | * Cache flushing area - ROM | ||
24 | */ | ||
25 | #define FLUSH_BASE_PHYS 0x00000000 | ||
26 | #define FLUSH_BASE 0xdf000000 | ||
27 | |||
28 | /* | ||
29 | * Sparsemem support. Each section is a maximum of 64MB. The sections | ||
30 | * are offset by 128MB and can cover 128MB, so that gives us a maximum | ||
31 | * of 29 physmem bits. | ||
32 | */ | ||
33 | #define MAX_PHYSMEM_BITS 29 | ||
34 | #define SECTION_SIZE_BITS 26 | ||
35 | |||
36 | #endif | ||
diff --git a/arch/arm/mach-clps7500/include/mach/system.h b/arch/arm/mach-clps7500/include/mach/system.h deleted file mode 100644 index 6d325fbe8b08..000000000000 --- a/arch/arm/mach-clps7500/include/mach/system.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/system.h | ||
3 | * | ||
4 | * Copyright (c) 1999 Nexus Electronics Ltd. | ||
5 | */ | ||
6 | #ifndef __ASM_ARCH_SYSTEM_H | ||
7 | #define __ASM_ARCH_SYSTEM_H | ||
8 | |||
9 | #include <linux/io.h> | ||
10 | #include <asm/hardware/iomd.h> | ||
11 | |||
12 | static inline void arch_idle(void) | ||
13 | { | ||
14 | iomd_writeb(0, IOMD_SUSMODE); | ||
15 | } | ||
16 | |||
17 | #define arch_reset(mode) \ | ||
18 | do { \ | ||
19 | iomd_writeb(0, IOMD_ROMCR0); \ | ||
20 | cpu_reset(0); \ | ||
21 | } while (0) | ||
22 | |||
23 | #endif | ||
diff --git a/arch/arm/mach-clps7500/include/mach/timex.h b/arch/arm/mach-clps7500/include/mach/timex.h deleted file mode 100644 index dfaa9b425757..000000000000 --- a/arch/arm/mach-clps7500/include/mach/timex.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/timex.h | ||
3 | * | ||
4 | * CL7500 architecture timex specifications | ||
5 | * | ||
6 | * Copyright (C) 1999 Nexus Electronics Ltd | ||
7 | */ | ||
8 | |||
9 | /* | ||
10 | * On the ARM7500, the clock ticks at 2MHz. | ||
11 | */ | ||
12 | #define CLOCK_TICK_RATE 2000000 | ||
13 | |||
diff --git a/arch/arm/mach-clps7500/include/mach/uncompress.h b/arch/arm/mach-clps7500/include/mach/uncompress.h deleted file mode 100644 index d7d0af4b49fc..000000000000 --- a/arch/arm/mach-clps7500/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 1999, 2000 Nexus Electronics Ltd. | ||
5 | */ | ||
6 | #define BASE 0x03010000 | ||
7 | #define SERBASE (BASE + (0x2f8 << 2)) | ||
8 | |||
9 | static inline void putc(char c) | ||
10 | { | ||
11 | while (!(*((volatile unsigned int *)(SERBASE + 0x14)) & 0x20)) | ||
12 | barrier(); | ||
13 | |||
14 | *((volatile unsigned int *)(SERBASE)) = c; | ||
15 | } | ||
16 | |||
17 | static inline void flush(void) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | static __inline__ void arch_decomp_setup(void) | ||
22 | { | ||
23 | int baud = 3686400 / (9600 * 32); | ||
24 | |||
25 | *((volatile unsigned int *)(SERBASE + 0xC)) = 0x80; | ||
26 | *((volatile unsigned int *)(SERBASE + 0x0)) = baud & 0xff; | ||
27 | *((volatile unsigned int *)(SERBASE + 0x4)) = (baud & 0xff00) >> 8; | ||
28 | *((volatile unsigned int *)(SERBASE + 0xC)) = 3; /* 8 bits */ | ||
29 | *((volatile unsigned int *)(SERBASE + 0x10)) = 3; /* DTR, RTS */ | ||
30 | } | ||
31 | |||
32 | /* | ||
33 | * nothing to do | ||
34 | */ | ||
35 | #define arch_decomp_wdog() | ||
diff --git a/arch/arm/mach-clps7500/include/mach/vmalloc.h b/arch/arm/mach-clps7500/include/mach/vmalloc.h deleted file mode 100644 index 8fc5406d1b6d..000000000000 --- a/arch/arm/mach-clps7500/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/vmalloc.h | ||
3 | */ | ||
4 | #define VMALLOC_END (PAGE_OFFSET + 0x1c000000) | ||
diff --git a/arch/arm/mach-integrator/clock.c b/arch/arm/mach-integrator/clock.c index 8d761fdd2ecd..989ecf5f5c46 100644 --- a/arch/arm/mach-integrator/clock.c +++ b/arch/arm/mach-integrator/clock.c | |||
@@ -10,42 +10,12 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/list.h> | ||
14 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
15 | #include <linux/err.h> | ||
16 | #include <linux/string.h> | ||
17 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
18 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
19 | 16 | ||
20 | #include <asm/hardware/icst525.h> | 17 | #include <asm/clkdev.h> |
21 | 18 | #include <mach/clkdev.h> | |
22 | #include "clock.h" | ||
23 | |||
24 | static LIST_HEAD(clocks); | ||
25 | static DEFINE_MUTEX(clocks_mutex); | ||
26 | |||
27 | struct clk *clk_get(struct device *dev, const char *id) | ||
28 | { | ||
29 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
30 | |||
31 | mutex_lock(&clocks_mutex); | ||
32 | list_for_each_entry(p, &clocks, node) { | ||
33 | if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | ||
34 | clk = p; | ||
35 | break; | ||
36 | } | ||
37 | } | ||
38 | mutex_unlock(&clocks_mutex); | ||
39 | |||
40 | return clk; | ||
41 | } | ||
42 | EXPORT_SYMBOL(clk_get); | ||
43 | |||
44 | void clk_put(struct clk *clk) | ||
45 | { | ||
46 | module_put(clk->owner); | ||
47 | } | ||
48 | EXPORT_SYMBOL(clk_put); | ||
49 | 19 | ||
50 | int clk_enable(struct clk *clk) | 20 | int clk_enable(struct clk *clk) |
51 | { | 21 | { |
@@ -67,7 +37,6 @@ EXPORT_SYMBOL(clk_get_rate); | |||
67 | long clk_round_rate(struct clk *clk, unsigned long rate) | 37 | long clk_round_rate(struct clk *clk, unsigned long rate) |
68 | { | 38 | { |
69 | struct icst525_vco vco; | 39 | struct icst525_vco vco; |
70 | |||
71 | vco = icst525_khz_to_vco(clk->params, rate / 1000); | 40 | vco = icst525_khz_to_vco(clk->params, rate / 1000); |
72 | return icst525_khz(clk->params, vco) * 1000; | 41 | return icst525_khz(clk->params, vco) * 1000; |
73 | } | 42 | } |
@@ -76,56 +45,15 @@ EXPORT_SYMBOL(clk_round_rate); | |||
76 | int clk_set_rate(struct clk *clk, unsigned long rate) | 45 | int clk_set_rate(struct clk *clk, unsigned long rate) |
77 | { | 46 | { |
78 | int ret = -EIO; | 47 | int ret = -EIO; |
48 | |||
79 | if (clk->setvco) { | 49 | if (clk->setvco) { |
80 | struct icst525_vco vco; | 50 | struct icst525_vco vco; |
81 | 51 | ||
82 | vco = icst525_khz_to_vco(clk->params, rate / 1000); | 52 | vco = icst525_khz_to_vco(clk->params, rate / 1000); |
83 | clk->rate = icst525_khz(clk->params, vco) * 1000; | 53 | clk->rate = icst525_khz(clk->params, vco) * 1000; |
84 | |||
85 | printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n", | ||
86 | clk->name, vco.s, vco.r, vco.v); | ||
87 | |||
88 | clk->setvco(clk, vco); | 54 | clk->setvco(clk, vco); |
89 | ret = 0; | 55 | ret = 0; |
90 | } | 56 | } |
91 | return 0; | 57 | return ret; |
92 | } | 58 | } |
93 | EXPORT_SYMBOL(clk_set_rate); | 59 | EXPORT_SYMBOL(clk_set_rate); |
94 | |||
95 | /* | ||
96 | * These are fixed clocks. | ||
97 | */ | ||
98 | static struct clk kmi_clk = { | ||
99 | .name = "KMIREFCLK", | ||
100 | .rate = 24000000, | ||
101 | }; | ||
102 | |||
103 | static struct clk uart_clk = { | ||
104 | .name = "UARTCLK", | ||
105 | .rate = 14745600, | ||
106 | }; | ||
107 | |||
108 | int clk_register(struct clk *clk) | ||
109 | { | ||
110 | mutex_lock(&clocks_mutex); | ||
111 | list_add(&clk->node, &clocks); | ||
112 | mutex_unlock(&clocks_mutex); | ||
113 | return 0; | ||
114 | } | ||
115 | EXPORT_SYMBOL(clk_register); | ||
116 | |||
117 | void clk_unregister(struct clk *clk) | ||
118 | { | ||
119 | mutex_lock(&clocks_mutex); | ||
120 | list_del(&clk->node); | ||
121 | mutex_unlock(&clocks_mutex); | ||
122 | } | ||
123 | EXPORT_SYMBOL(clk_unregister); | ||
124 | |||
125 | static int __init clk_init(void) | ||
126 | { | ||
127 | clk_register(&kmi_clk); | ||
128 | clk_register(&uart_clk); | ||
129 | return 0; | ||
130 | } | ||
131 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-integrator/clock.h b/arch/arm/mach-integrator/clock.h index 09e6328ceba9..e69de29bb2d1 100644 --- a/arch/arm/mach-integrator/clock.h +++ b/arch/arm/mach-integrator/clock.h | |||
@@ -1,25 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-integrator/clock.h | ||
3 | * | ||
4 | * Copyright (C) 2004 ARM Limited. | ||
5 | * Written by Deep Blue Solutions Limited. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | struct module; | ||
12 | struct icst525_params; | ||
13 | |||
14 | struct clk { | ||
15 | struct list_head node; | ||
16 | unsigned long rate; | ||
17 | struct module *owner; | ||
18 | const char *name; | ||
19 | const struct icst525_params *params; | ||
20 | void *data; | ||
21 | void (*setvco)(struct clk *, struct icst525_vco vco); | ||
22 | }; | ||
23 | |||
24 | int clk_register(struct clk *clk); | ||
25 | void clk_unregister(struct clk *clk); | ||
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 595b7392ee4e..c89c949b4d45 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/amba/serial.h> | 21 | #include <linux/amba/serial.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | 23 | ||
24 | #include <asm/clkdev.h> | ||
25 | #include <mach/clkdev.h> | ||
24 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
25 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
26 | #include <asm/hardware/arm_timer.h> | 28 | #include <asm/hardware/arm_timer.h> |
@@ -108,10 +110,43 @@ static struct amba_device *amba_devs[] __initdata = { | |||
108 | &kmi1_device, | 110 | &kmi1_device, |
109 | }; | 111 | }; |
110 | 112 | ||
113 | /* | ||
114 | * These are fixed clocks. | ||
115 | */ | ||
116 | static struct clk clk24mhz = { | ||
117 | .rate = 24000000, | ||
118 | }; | ||
119 | |||
120 | static struct clk uartclk = { | ||
121 | .rate = 14745600, | ||
122 | }; | ||
123 | |||
124 | static struct clk_lookup lookups[] __initdata = { | ||
125 | { /* UART0 */ | ||
126 | .dev_id = "mb:16", | ||
127 | .clk = &uartclk, | ||
128 | }, { /* UART1 */ | ||
129 | .dev_id = "mb:17", | ||
130 | .clk = &uartclk, | ||
131 | }, { /* KMI0 */ | ||
132 | .dev_id = "mb:18", | ||
133 | .clk = &clk24mhz, | ||
134 | }, { /* KMI1 */ | ||
135 | .dev_id = "mb:19", | ||
136 | .clk = &clk24mhz, | ||
137 | }, { /* MMCI - IntegratorCP */ | ||
138 | .dev_id = "mb:1c", | ||
139 | .clk = &uartclk, | ||
140 | } | ||
141 | }; | ||
142 | |||
111 | static int __init integrator_init(void) | 143 | static int __init integrator_init(void) |
112 | { | 144 | { |
113 | int i; | 145 | int i; |
114 | 146 | ||
147 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | ||
148 | clkdev_add(&lookups[i]); | ||
149 | |||
115 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 150 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
116 | struct amba_device *d = amba_devs[i]; | 151 | struct amba_device *d = amba_devs[i]; |
117 | amba_device_register(d, &iomem_resource); | 152 | amba_device_register(d, &iomem_resource); |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 172299a78302..0058c937719e 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -22,13 +22,13 @@ | |||
22 | #include <linux/amba/clcd.h> | 22 | #include <linux/amba/clcd.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | 24 | ||
25 | #include <asm/clkdev.h> | ||
26 | #include <mach/clkdev.h> | ||
25 | #include <asm/hardware/icst525.h> | 27 | #include <asm/hardware/icst525.h> |
26 | #include <mach/lm.h> | 28 | #include <mach/lm.h> |
27 | #include <mach/impd1.h> | 29 | #include <mach/impd1.h> |
28 | #include <asm/sizes.h> | 30 | #include <asm/sizes.h> |
29 | 31 | ||
30 | #include "clock.h" | ||
31 | |||
32 | static int module_id; | 32 | static int module_id; |
33 | 33 | ||
34 | module_param_named(lmid, module_id, int, 0444); | 34 | module_param_named(lmid, module_id, int, 0444); |
@@ -37,6 +37,7 @@ MODULE_PARM_DESC(lmid, "logic module stack position"); | |||
37 | struct impd1_module { | 37 | struct impd1_module { |
38 | void __iomem *base; | 38 | void __iomem *base; |
39 | struct clk vcos[2]; | 39 | struct clk vcos[2]; |
40 | struct clk_lookup *clks[3]; | ||
40 | }; | 41 | }; |
41 | 42 | ||
42 | static const struct icst525_params impd1_vco_params = { | 43 | static const struct icst525_params impd1_vco_params = { |
@@ -339,9 +340,8 @@ static struct impd1_device impd1_devs[] = { | |||
339 | } | 340 | } |
340 | }; | 341 | }; |
341 | 342 | ||
342 | static const char *impd1_vconames[2] = { | 343 | static struct clk fixed_14745600 = { |
343 | "CLCDCLK", | 344 | .rate = 14745600, |
344 | "AUXVCO2", | ||
345 | }; | 345 | }; |
346 | 346 | ||
347 | static int impd1_probe(struct lm_device *dev) | 347 | static int impd1_probe(struct lm_device *dev) |
@@ -374,14 +374,20 @@ static int impd1_probe(struct lm_device *dev) | |||
374 | 374 | ||
375 | for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) { | 375 | for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) { |
376 | impd1->vcos[i].owner = THIS_MODULE, | 376 | impd1->vcos[i].owner = THIS_MODULE, |
377 | impd1->vcos[i].name = impd1_vconames[i], | ||
378 | impd1->vcos[i].params = &impd1_vco_params, | 377 | impd1->vcos[i].params = &impd1_vco_params, |
379 | impd1->vcos[i].data = impd1, | 378 | impd1->vcos[i].data = impd1, |
380 | impd1->vcos[i].setvco = impd1_setvco; | 379 | impd1->vcos[i].setvco = impd1_setvco; |
381 | |||
382 | clk_register(&impd1->vcos[i]); | ||
383 | } | 380 | } |
384 | 381 | ||
382 | impd1->clks[0] = clkdev_alloc(&impd1->vcos[0], NULL, "lm%x:01000", | ||
383 | dev->id); | ||
384 | impd1->clks[1] = clkdev_alloc(&fixed_14745600, NULL, "lm%x:00100", | ||
385 | dev->id); | ||
386 | impd1->clks[2] = clkdev_alloc(&fixed_14745600, NULL, "lm%x:00200", | ||
387 | dev->id); | ||
388 | for (i = 0; i < ARRAY_SIZE(impd1->clks); i++) | ||
389 | clkdev_add(impd1->clks[i]); | ||
390 | |||
385 | for (i = 0; i < ARRAY_SIZE(impd1_devs); i++) { | 391 | for (i = 0; i < ARRAY_SIZE(impd1_devs); i++) { |
386 | struct impd1_device *idev = impd1_devs + i; | 392 | struct impd1_device *idev = impd1_devs + i; |
387 | struct amba_device *d; | 393 | struct amba_device *d; |
@@ -434,8 +440,8 @@ static void impd1_remove(struct lm_device *dev) | |||
434 | 440 | ||
435 | device_for_each_child(&dev->dev, NULL, impd1_remove_one); | 441 | device_for_each_child(&dev->dev, NULL, impd1_remove_one); |
436 | 442 | ||
437 | for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) | 443 | for (i = 0; i < ARRAY_SIZE(impd1->clks); i++) |
438 | clk_unregister(&impd1->vcos[i]); | 444 | clkdev_drop(impd1->clks[i]); |
439 | 445 | ||
440 | lm_set_drvdata(dev, NULL); | 446 | lm_set_drvdata(dev, NULL); |
441 | 447 | ||
diff --git a/arch/arm/mach-integrator/include/mach/clkdev.h b/arch/arm/mach-integrator/include/mach/clkdev.h new file mode 100644 index 000000000000..9293e410832a --- /dev/null +++ b/arch/arm/mach-integrator/include/mach/clkdev.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | ||
2 | #define __ASM_MACH_CLKDEV_H | ||
3 | |||
4 | #include <linux/module.h> | ||
5 | #include <asm/hardware/icst525.h> | ||
6 | |||
7 | struct clk { | ||
8 | unsigned long rate; | ||
9 | struct module *owner; | ||
10 | const struct icst525_params *params; | ||
11 | void *data; | ||
12 | void (*setvco)(struct clk *, struct icst525_vco vco); | ||
13 | }; | ||
14 | |||
15 | static inline int __clk_get(struct clk *clk) | ||
16 | { | ||
17 | return try_module_get(clk->owner); | ||
18 | } | ||
19 | |||
20 | static inline void __clk_put(struct clk *clk) | ||
21 | { | ||
22 | module_put(clk->owner); | ||
23 | } | ||
24 | |||
25 | #endif | ||
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 88026ccd5ac9..427c2d8dc123 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/amba/clcd.h> | 21 | #include <linux/amba/clcd.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | 23 | ||
24 | #include <asm/clkdev.h> | ||
25 | #include <mach/clkdev.h> | ||
24 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
25 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
26 | #include <asm/setup.h> | 28 | #include <asm/setup.h> |
@@ -38,7 +40,6 @@ | |||
38 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
39 | 41 | ||
40 | #include "common.h" | 42 | #include "common.h" |
41 | #include "clock.h" | ||
42 | 43 | ||
43 | #define INTCP_PA_MMC_BASE 0x1c000000 | 44 | #define INTCP_PA_MMC_BASE 0x1c000000 |
44 | #define INTCP_PA_AACI_BASE 0x1d000000 | 45 | #define INTCP_PA_AACI_BASE 0x1d000000 |
@@ -289,15 +290,16 @@ static void cp_auxvco_set(struct clk *clk, struct icst525_vco vco) | |||
289 | writel(0, CM_LOCK); | 290 | writel(0, CM_LOCK); |
290 | } | 291 | } |
291 | 292 | ||
292 | static struct clk cp_clcd_clk = { | 293 | static struct clk cp_auxclk = { |
293 | .name = "CLCDCLK", | ||
294 | .params = &cp_auxvco_params, | 294 | .params = &cp_auxvco_params, |
295 | .setvco = cp_auxvco_set, | 295 | .setvco = cp_auxvco_set, |
296 | }; | 296 | }; |
297 | 297 | ||
298 | static struct clk cp_mmci_clk = { | 298 | static struct clk_lookup cp_lookups[] = { |
299 | .name = "MCLK", | 299 | { /* CLCD */ |
300 | .rate = 14745600, | 300 | .dev_id = "mb:c0", |
301 | .clk = &cp_auxclk, | ||
302 | }, | ||
301 | }; | 303 | }; |
302 | 304 | ||
303 | /* | 305 | /* |
@@ -554,8 +556,8 @@ static void __init intcp_init(void) | |||
554 | { | 556 | { |
555 | int i; | 557 | int i; |
556 | 558 | ||
557 | clk_register(&cp_clcd_clk); | 559 | for (i = 0; i < ARRAY_SIZE(cp_lookups); i++) |
558 | clk_register(&cp_mmci_clk); | 560 | clkdev_add(&cp_lookups[i]); |
559 | 561 | ||
560 | platform_add_devices(intcp_devs, ARRAY_SIZE(intcp_devs)); | 562 | platform_add_devices(intcp_devs, ARRAY_SIZE(intcp_devs)); |
561 | 563 | ||
diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig index 79f0b1f8497b..10a301e32434 100644 --- a/arch/arm/mach-omap1/Kconfig +++ b/arch/arm/mach-omap1/Kconfig | |||
@@ -4,16 +4,19 @@ comment "OMAP Core Type" | |||
4 | config ARCH_OMAP730 | 4 | config ARCH_OMAP730 |
5 | depends on ARCH_OMAP1 | 5 | depends on ARCH_OMAP1 |
6 | bool "OMAP730 Based System" | 6 | bool "OMAP730 Based System" |
7 | select CPU_ARM926T | ||
7 | select ARCH_OMAP_OTG | 8 | select ARCH_OMAP_OTG |
8 | 9 | ||
9 | config ARCH_OMAP15XX | 10 | config ARCH_OMAP15XX |
10 | depends on ARCH_OMAP1 | 11 | depends on ARCH_OMAP1 |
11 | default y | 12 | default y |
12 | bool "OMAP15xx Based System" | 13 | bool "OMAP15xx Based System" |
14 | select CPU_ARM925T | ||
13 | 15 | ||
14 | config ARCH_OMAP16XX | 16 | config ARCH_OMAP16XX |
15 | depends on ARCH_OMAP1 | 17 | depends on ARCH_OMAP1 |
16 | bool "OMAP16xx Based System" | 18 | bool "OMAP16xx Based System" |
19 | select CPU_ARM926T | ||
17 | select ARCH_OMAP_OTG | 20 | select ARCH_OMAP_OTG |
18 | 21 | ||
19 | comment "OMAP Board Type" | 22 | comment "OMAP Board Type" |
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index a062235e83a8..740f0a382bac 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -386,16 +386,19 @@ endmenu | |||
386 | 386 | ||
387 | config PXA25x | 387 | config PXA25x |
388 | bool | 388 | bool |
389 | select CPU_XSCALE | ||
389 | help | 390 | help |
390 | Select code specific to PXA21x/25x/26x variants | 391 | Select code specific to PXA21x/25x/26x variants |
391 | 392 | ||
392 | config PXA27x | 393 | config PXA27x |
393 | bool | 394 | bool |
395 | select CPU_XSCALE | ||
394 | help | 396 | help |
395 | Select code specific to PXA27x variants | 397 | Select code specific to PXA27x variants |
396 | 398 | ||
397 | config PXA3xx | 399 | config PXA3xx |
398 | bool | 400 | bool |
401 | select CPU_XSC3 | ||
399 | help | 402 | help |
400 | Select code specific to PXA3xx variants | 403 | Select code specific to PXA3xx variants |
401 | 404 | ||
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c index ca8e20538157..a3e0e1989a6b 100644 --- a/arch/arm/mach-pxa/clock.c +++ b/arch/arm/mach-pxa/clock.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | 14 | ||
15 | #include <asm/clkdev.h> | ||
15 | #include <mach/pxa2xx-regs.h> | 16 | #include <mach/pxa2xx-regs.h> |
16 | #include <mach/pxa2xx-gpio.h> | 17 | #include <mach/pxa2xx-gpio.h> |
17 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
@@ -20,45 +21,8 @@ | |||
20 | #include "generic.h" | 21 | #include "generic.h" |
21 | #include "clock.h" | 22 | #include "clock.h" |
22 | 23 | ||
23 | static LIST_HEAD(clocks); | ||
24 | static DEFINE_MUTEX(clocks_mutex); | ||
25 | static DEFINE_SPINLOCK(clocks_lock); | 24 | static DEFINE_SPINLOCK(clocks_lock); |
26 | 25 | ||
27 | static struct clk *clk_lookup(struct device *dev, const char *id) | ||
28 | { | ||
29 | struct clk *p; | ||
30 | |||
31 | list_for_each_entry(p, &clocks, node) | ||
32 | if (strcmp(id, p->name) == 0 && p->dev == dev) | ||
33 | return p; | ||
34 | |||
35 | return NULL; | ||
36 | } | ||
37 | |||
38 | struct clk *clk_get(struct device *dev, const char *id) | ||
39 | { | ||
40 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
41 | |||
42 | mutex_lock(&clocks_mutex); | ||
43 | p = clk_lookup(dev, id); | ||
44 | if (!p) | ||
45 | p = clk_lookup(NULL, id); | ||
46 | if (p) | ||
47 | clk = p; | ||
48 | mutex_unlock(&clocks_mutex); | ||
49 | |||
50 | if (!IS_ERR(clk) && clk->ops == NULL) | ||
51 | clk = clk->other; | ||
52 | |||
53 | return clk; | ||
54 | } | ||
55 | EXPORT_SYMBOL(clk_get); | ||
56 | |||
57 | void clk_put(struct clk *clk) | ||
58 | { | ||
59 | } | ||
60 | EXPORT_SYMBOL(clk_put); | ||
61 | |||
62 | int clk_enable(struct clk *clk) | 26 | int clk_enable(struct clk *clk) |
63 | { | 27 | { |
64 | unsigned long flags; | 28 | unsigned long flags; |
@@ -116,37 +80,27 @@ const struct clkops clk_cken_ops = { | |||
116 | .disable = clk_cken_disable, | 80 | .disable = clk_cken_disable, |
117 | }; | 81 | }; |
118 | 82 | ||
119 | void clks_register(struct clk *clks, size_t num) | 83 | void clks_register(struct clk_lookup *clks, size_t num) |
120 | { | 84 | { |
121 | int i; | 85 | int i; |
122 | 86 | ||
123 | mutex_lock(&clocks_mutex); | ||
124 | for (i = 0; i < num; i++) | 87 | for (i = 0; i < num; i++) |
125 | list_add(&clks[i].node, &clocks); | 88 | clkdev_add(&clks[i]); |
126 | mutex_unlock(&clocks_mutex); | ||
127 | } | 89 | } |
128 | 90 | ||
129 | int clk_add_alias(char *alias, struct device *alias_dev, char *id, | 91 | int clk_add_alias(char *alias, struct device *alias_dev, char *id, |
130 | struct device *dev) | 92 | struct device *dev) |
131 | { | 93 | { |
132 | struct clk *r = clk_lookup(dev, id); | 94 | struct clk *r = clk_get(dev, id); |
133 | struct clk *new; | 95 | struct clk_lookup *l; |
134 | 96 | ||
135 | if (!r) | 97 | if (!r) |
136 | return -ENODEV; | 98 | return -ENODEV; |
137 | 99 | ||
138 | new = kzalloc(sizeof(struct clk), GFP_KERNEL); | 100 | l = clkdev_alloc(r, alias, alias_dev ? dev_name(alias_dev) : NULL); |
139 | 101 | clk_put(r); | |
140 | if (!new) | 102 | if (!l) |
141 | return -ENOMEM; | 103 | return -ENODEV; |
142 | 104 | clkdev_add(l); | |
143 | new->name = alias; | ||
144 | new->dev = alias_dev; | ||
145 | new->other = r; | ||
146 | |||
147 | mutex_lock(&clocks_mutex); | ||
148 | list_add(&new->node, &clocks); | ||
149 | mutex_unlock(&clocks_mutex); | ||
150 | |||
151 | return 0; | 105 | return 0; |
152 | } | 106 | } |
diff --git a/arch/arm/mach-pxa/clock.h b/arch/arm/mach-pxa/clock.h index 73be795fe3bf..4e9c613c6767 100644 --- a/arch/arm/mach-pxa/clock.h +++ b/arch/arm/mach-pxa/clock.h | |||
@@ -1,6 +1,4 @@ | |||
1 | #include <linux/list.h> | 1 | #include <asm/clkdev.h> |
2 | |||
3 | struct clk; | ||
4 | 2 | ||
5 | struct clkops { | 3 | struct clkops { |
6 | void (*enable)(struct clk *); | 4 | void (*enable)(struct clk *); |
@@ -9,9 +7,6 @@ struct clkops { | |||
9 | }; | 7 | }; |
10 | 8 | ||
11 | struct clk { | 9 | struct clk { |
12 | struct list_head node; | ||
13 | const char *name; | ||
14 | struct device *dev; | ||
15 | const struct clkops *ops; | 10 | const struct clkops *ops; |
16 | unsigned long rate; | 11 | unsigned long rate; |
17 | unsigned int cken; | 12 | unsigned int cken; |
@@ -20,41 +15,31 @@ struct clk { | |||
20 | struct clk *other; | 15 | struct clk *other; |
21 | }; | 16 | }; |
22 | 17 | ||
23 | #define INIT_CKEN(_name, _cken, _rate, _delay, _dev) \ | 18 | #define INIT_CLKREG(_clk,_devname,_conname) \ |
24 | { \ | 19 | { \ |
25 | .name = _name, \ | 20 | .clk = _clk, \ |
26 | .dev = _dev, \ | 21 | .dev_id = _devname, \ |
22 | .con_id = _conname, \ | ||
23 | } | ||
24 | |||
25 | #define DEFINE_CKEN(_name, _cken, _rate, _delay) \ | ||
26 | struct clk clk_##_name = { \ | ||
27 | .ops = &clk_cken_ops, \ | 27 | .ops = &clk_cken_ops, \ |
28 | .rate = _rate, \ | 28 | .rate = _rate, \ |
29 | .cken = CKEN_##_cken, \ | 29 | .cken = CKEN_##_cken, \ |
30 | .delay = _delay, \ | 30 | .delay = _delay, \ |
31 | } | 31 | } |
32 | 32 | ||
33 | #define INIT_CK(_name, _cken, _ops, _dev) \ | 33 | #define DEFINE_CK(_name, _cken, _ops) \ |
34 | { \ | 34 | struct clk clk_##_name = { \ |
35 | .name = _name, \ | ||
36 | .dev = _dev, \ | ||
37 | .ops = _ops, \ | 35 | .ops = _ops, \ |
38 | .cken = CKEN_##_cken, \ | 36 | .cken = CKEN_##_cken, \ |
39 | } | 37 | } |
40 | 38 | ||
41 | /* | 39 | #define DEFINE_CLK(_name, _ops, _rate, _delay) \ |
42 | * This is a placeholder to alias one clock device+name pair | 40 | struct clk clk_##_name = { \ |
43 | * to another struct clk. | 41 | .ops = _ops, \ |
44 | */ | 42 | .rate = _rate, \ |
45 | #define INIT_CKOTHER(_name, _other, _dev) \ | ||
46 | { \ | ||
47 | .name = _name, \ | ||
48 | .dev = _dev, \ | ||
49 | .other = _other, \ | ||
50 | } | ||
51 | |||
52 | #define INIT_CLK(_name, _ops, _rate, _delay, _dev) \ | ||
53 | { \ | ||
54 | .name = _name, \ | ||
55 | .dev = _dev, \ | ||
56 | .ops = _ops, \ | ||
57 | .rate = _rate, \ | ||
58 | .delay = _delay, \ | 43 | .delay = _delay, \ |
59 | } | 44 | } |
60 | 45 | ||
@@ -64,20 +49,16 @@ void clk_cken_enable(struct clk *clk); | |||
64 | void clk_cken_disable(struct clk *clk); | 49 | void clk_cken_disable(struct clk *clk); |
65 | 50 | ||
66 | #ifdef CONFIG_PXA3xx | 51 | #ifdef CONFIG_PXA3xx |
67 | #define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \ | 52 | #define DEFINE_PXA3_CKEN(_name, _cken, _rate, _delay) \ |
68 | { \ | 53 | struct clk clk_##_name = { \ |
69 | .name = _name, \ | ||
70 | .dev = _dev, \ | ||
71 | .ops = &clk_pxa3xx_cken_ops, \ | 54 | .ops = &clk_pxa3xx_cken_ops, \ |
72 | .rate = _rate, \ | 55 | .rate = _rate, \ |
73 | .cken = CKEN_##_cken, \ | 56 | .cken = CKEN_##_cken, \ |
74 | .delay = _delay, \ | 57 | .delay = _delay, \ |
75 | } | 58 | } |
76 | 59 | ||
77 | #define PXA3xx_CK(_name, _cken, _ops, _dev) \ | 60 | #define DEFINE_PXA3_CK(_name, _cken, _ops) \ |
78 | { \ | 61 | struct clk clk_##_name = { \ |
79 | .name = _name, \ | ||
80 | .dev = _dev, \ | ||
81 | .ops = _ops, \ | 62 | .ops = _ops, \ |
82 | .cken = CKEN_##_cken, \ | 63 | .cken = CKEN_##_cken, \ |
83 | } | 64 | } |
@@ -87,7 +68,7 @@ extern void clk_pxa3xx_cken_enable(struct clk *); | |||
87 | extern void clk_pxa3xx_cken_disable(struct clk *); | 68 | extern void clk_pxa3xx_cken_disable(struct clk *); |
88 | #endif | 69 | #endif |
89 | 70 | ||
90 | void clks_register(struct clk *clks, size_t num); | 71 | void clks_register(struct clk_lookup *clks, size_t num); |
91 | int clk_add_alias(char *alias, struct device *alias_dev, char *id, | 72 | int clk_add_alias(char *alias, struct device *alias_dev, char *id, |
92 | struct device *dev); | 73 | struct device *dev); |
93 | 74 | ||
diff --git a/arch/arm/mach-pxa/include/mach/clkdev.h b/arch/arm/mach-pxa/include/mach/clkdev.h new file mode 100644 index 000000000000..04b37a89801c --- /dev/null +++ b/arch/arm/mach-pxa/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | ||
2 | #define __ASM_MACH_CLKDEV_H | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do { } while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-pxa/pwm.c b/arch/arm/mach-pxa/pwm.c index 74e2ead8cee8..3ca7ffc6904b 100644 --- a/arch/arm/mach-pxa/pwm.c +++ b/arch/arm/mach-pxa/pwm.c | |||
@@ -173,7 +173,7 @@ static struct pwm_device *pwm_probe(struct platform_device *pdev, | |||
173 | return ERR_PTR(-ENOMEM); | 173 | return ERR_PTR(-ENOMEM); |
174 | } | 174 | } |
175 | 175 | ||
176 | pwm->clk = clk_get(&pdev->dev, "PWMCLK"); | 176 | pwm->clk = clk_get(&pdev->dev, NULL); |
177 | if (IS_ERR(pwm->clk)) { | 177 | if (IS_ERR(pwm->clk)) { |
178 | ret = PTR_ERR(pwm->clk); | 178 | ret = PTR_ERR(pwm->clk); |
179 | goto err_free; | 179 | goto err_free; |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 25d17a1dab78..344b3282caf9 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -167,36 +167,51 @@ static const struct clkops clk_pxa25x_gpio11_ops = { | |||
167 | * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz | 167 | * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz |
168 | * 147.456MHz -> UART 14.7456MHz, AC97 12.288MHz, I2S 5.672MHz (allegedly) | 168 | * 147.456MHz -> UART 14.7456MHz, AC97 12.288MHz, I2S 5.672MHz (allegedly) |
169 | */ | 169 | */ |
170 | static struct clk pxa25x_hwuart_clk = | 170 | static DEFINE_CKEN(pxa25x_hwuart, HWUART, 14745600, 1); |
171 | INIT_CKEN("UARTCLK", HWUART, 14745600, 1, &pxa_device_hwuart.dev) | 171 | |
172 | ; | 172 | static struct clk_lookup pxa25x_hwuart_clkreg = |
173 | INIT_CLKREG(&clk_pxa25x_hwuart, "pxa2xx-uart.3", NULL); | ||
173 | 174 | ||
174 | /* | 175 | /* |
175 | * PXA 2xx clock declarations. | 176 | * PXA 2xx clock declarations. |
176 | */ | 177 | */ |
177 | static struct clk pxa25x_clks[] = { | 178 | static DEFINE_CK(pxa25x_lcd, LCD, &clk_pxa25x_lcd_ops); |
178 | INIT_CK("LCDCLK", LCD, &clk_pxa25x_lcd_ops, &pxa_device_fb.dev), | 179 | static DEFINE_CKEN(pxa25x_ffuart, FFUART, 14745600, 1); |
179 | INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev), | 180 | static DEFINE_CKEN(pxa25x_btuart, BTUART, 14745600, 1); |
180 | INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev), | 181 | static DEFINE_CKEN(pxa25x_stuart, STUART, 14745600, 1); |
181 | INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL), | 182 | static DEFINE_CKEN(pxa25x_usb, USB, 47923000, 5); |
182 | INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa25x_device_udc.dev), | 183 | static DEFINE_CLK(pxa25x_gpio11, &clk_pxa25x_gpio11_ops, 3686400, 0); |
183 | INIT_CLK("GPIO11_CLK", &clk_pxa25x_gpio11_ops, 3686400, 0, NULL), | 184 | static DEFINE_CLK(pxa25x_gpio12, &clk_pxa25x_gpio12_ops, 32768, 0); |
184 | INIT_CLK("GPIO12_CLK", &clk_pxa25x_gpio12_ops, 32768, 0, NULL), | 185 | static DEFINE_CKEN(pxa25x_mmc, MMC, 19169000, 0); |
185 | INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev), | 186 | static DEFINE_CKEN(pxa25x_i2c, I2C, 31949000, 0); |
186 | INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev), | 187 | static DEFINE_CKEN(pxa25x_ssp, SSP, 3686400, 0); |
187 | 188 | static DEFINE_CKEN(pxa25x_nssp, NSSP, 3686400, 0); | |
188 | INIT_CKEN("SSPCLK", SSP, 3686400, 0, &pxa25x_device_ssp.dev), | 189 | static DEFINE_CKEN(pxa25x_assp, ASSP, 3686400, 0); |
189 | INIT_CKEN("SSPCLK", NSSP, 3686400, 0, &pxa25x_device_nssp.dev), | 190 | static DEFINE_CKEN(pxa25x_pwm0, PWM0, 3686400, 0); |
190 | INIT_CKEN("SSPCLK", ASSP, 3686400, 0, &pxa25x_device_assp.dev), | 191 | static DEFINE_CKEN(pxa25x_pwm1, PWM1, 3686400, 0); |
191 | INIT_CKEN("PWMCLK", PWM0, 3686400, 0, &pxa25x_device_pwm0.dev), | 192 | static DEFINE_CKEN(pxa25x_ac97, AC97, 24576000, 0); |
192 | INIT_CKEN("PWMCLK", PWM1, 3686400, 0, &pxa25x_device_pwm1.dev), | 193 | static DEFINE_CKEN(pxa25x_i2s, I2S, 14745600, 0); |
193 | 194 | static DEFINE_CKEN(pxa25x_ficp, FICP, 47923000, 0); | |
194 | INIT_CKEN("AC97CLK", AC97, 24576000, 0, NULL), | 195 | |
195 | 196 | static struct clk_lookup pxa25x_clkregs[] = { | |
196 | /* | 197 | INIT_CLKREG(&clk_pxa25x_lcd, "pxa2xx-fb", NULL), |
197 | INIT_CKEN("I2SCLK", I2S, 14745600, 0, NULL), | 198 | INIT_CLKREG(&clk_pxa25x_ffuart, "pxa2xx-uart.0", NULL), |
198 | */ | 199 | INIT_CLKREG(&clk_pxa25x_btuart, "pxa2xx-uart.1", NULL), |
199 | INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL), | 200 | INIT_CLKREG(&clk_pxa25x_stuart, "pxa2xx-uart.2", NULL), |
201 | INIT_CLKREG(&clk_pxa25x_usb, "pxa25x-udc", NULL), | ||
202 | INIT_CLKREG(&clk_pxa25x_mmc, "pxa2xx-mci.0", NULL), | ||
203 | INIT_CLKREG(&clk_pxa25x_i2c, "pxa2xx-i2c.0", NULL), | ||
204 | INIT_CLKREG(&clk_pxa25x_ssp, "pxa25x-ssp.0", NULL), | ||
205 | INIT_CLKREG(&clk_pxa25x_nssp, "pxa25x-nssp.1", NULL), | ||
206 | INIT_CLKREG(&clk_pxa25x_assp, "pxa25x-nssp.2", NULL), | ||
207 | INIT_CLKREG(&clk_pxa25x_pwm0, "pxa25x-pwm.0", NULL), | ||
208 | INIT_CLKREG(&clk_pxa25x_pwm1, "pxa25x-pwm.1", NULL), | ||
209 | INIT_CLKREG(&clk_pxa25x_i2s, "pxa2xx-i2s", NULL), | ||
210 | INIT_CLKREG(&clk_pxa25x_stuart, "pxa2xx-ir", "UARTCLK"), | ||
211 | INIT_CLKREG(&clk_pxa25x_ficp, "pxa2xx-ir", "FICPCLK"), | ||
212 | INIT_CLKREG(&clk_pxa25x_ac97, NULL, "AC97CLK"), | ||
213 | INIT_CLKREG(&clk_pxa25x_gpio11, NULL, "GPIO11_CLK"), | ||
214 | INIT_CLKREG(&clk_pxa25x_gpio12, NULL, "GPIO12_CLK"), | ||
200 | }; | 215 | }; |
201 | 216 | ||
202 | #ifdef CONFIG_PM | 217 | #ifdef CONFIG_PM |
@@ -336,7 +351,7 @@ static int __init pxa25x_init(void) | |||
336 | 351 | ||
337 | reset_status = RCSR; | 352 | reset_status = RCSR; |
338 | 353 | ||
339 | clks_register(pxa25x_clks, ARRAY_SIZE(pxa25x_clks)); | 354 | clks_register(pxa25x_clkregs, ARRAY_SIZE(pxa25x_clkregs)); |
340 | 355 | ||
341 | if ((ret = pxa_init_dma(16))) | 356 | if ((ret = pxa_init_dma(16))) |
342 | return ret; | 357 | return ret; |
@@ -357,7 +372,7 @@ static int __init pxa25x_init(void) | |||
357 | 372 | ||
358 | /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */ | 373 | /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */ |
359 | if (cpu_is_pxa255() || cpu_is_pxa26x()) { | 374 | if (cpu_is_pxa255() || cpu_is_pxa26x()) { |
360 | clks_register(&pxa25x_hwuart_clk, 1); | 375 | clks_register(&pxa25x_hwuart_clkreg, 1); |
361 | ret = platform_device_register(&pxa_device_hwuart); | 376 | ret = platform_device_register(&pxa_device_hwuart); |
362 | } | 377 | } |
363 | 378 | ||
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 3e4ab2279c99..15c8e5b9f9bc 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -144,40 +144,59 @@ static const struct clkops clk_pxa27x_lcd_ops = { | |||
144 | .getrate = clk_pxa27x_lcd_getrate, | 144 | .getrate = clk_pxa27x_lcd_getrate, |
145 | }; | 145 | }; |
146 | 146 | ||
147 | static struct clk pxa27x_clks[] = { | 147 | static DEFINE_CK(pxa27x_lcd, LCD, &clk_pxa27x_lcd_ops); |
148 | INIT_CK("LCDCLK", LCD, &clk_pxa27x_lcd_ops, &pxa_device_fb.dev), | 148 | static DEFINE_CK(pxa27x_camera, CAMERA, &clk_pxa27x_lcd_ops); |
149 | INIT_CK("CAMCLK", CAMERA, &clk_pxa27x_lcd_ops, NULL), | 149 | static DEFINE_CKEN(pxa27x_ffuart, FFUART, 14857000, 1); |
150 | 150 | static DEFINE_CKEN(pxa27x_btuart, BTUART, 14857000, 1); | |
151 | INIT_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev), | 151 | static DEFINE_CKEN(pxa27x_stuart, STUART, 14857000, 1); |
152 | INIT_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev), | 152 | static DEFINE_CKEN(pxa27x_i2s, I2S, 14682000, 0); |
153 | INIT_CKEN("UARTCLK", STUART, 14857000, 1, NULL), | 153 | static DEFINE_CKEN(pxa27x_i2c, I2C, 32842000, 0); |
154 | 154 | static DEFINE_CKEN(pxa27x_usb, USB, 48000000, 5); | |
155 | INIT_CKEN("I2SCLK", I2S, 14682000, 0, &pxa_device_i2s.dev), | 155 | static DEFINE_CKEN(pxa27x_mmc, MMC, 19500000, 0); |
156 | INIT_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), | 156 | static DEFINE_CKEN(pxa27x_ficp, FICP, 48000000, 0); |
157 | INIT_CKEN("UDCCLK", USB, 48000000, 5, &pxa27x_device_udc.dev), | 157 | static DEFINE_CKEN(pxa27x_usbhost, USBHOST, 48000000, 0); |
158 | INIT_CKEN("MMCCLK", MMC, 19500000, 0, &pxa_device_mci.dev), | 158 | static DEFINE_CKEN(pxa27x_pwri2c, PWRI2C, 13000000, 0); |
159 | INIT_CKEN("FICPCLK", FICP, 48000000, 0, &pxa_device_ficp.dev), | 159 | static DEFINE_CKEN(pxa27x_keypad, KEYPAD, 32768, 0); |
160 | 160 | static DEFINE_CKEN(pxa27x_ssp1, SSP1, 13000000, 0); | |
161 | INIT_CKEN("USBCLK", USBHOST, 48000000, 0, &pxa27x_device_ohci.dev), | 161 | static DEFINE_CKEN(pxa27x_ssp2, SSP2, 13000000, 0); |
162 | INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev), | 162 | static DEFINE_CKEN(pxa27x_ssp3, SSP3, 13000000, 0); |
163 | INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev), | 163 | static DEFINE_CKEN(pxa27x_pwm0, PWM0, 13000000, 0); |
164 | 164 | static DEFINE_CKEN(pxa27x_pwm1, PWM1, 13000000, 0); | |
165 | INIT_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev), | 165 | static DEFINE_CKEN(pxa27x_ac97, AC97, 24576000, 0); |
166 | INIT_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev), | 166 | static DEFINE_CKEN(pxa27x_ac97conf, AC97CONF, 24576000, 0); |
167 | INIT_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev), | 167 | static DEFINE_CKEN(pxa27x_msl, MSL, 48000000, 0); |
168 | INIT_CKEN("PWMCLK", PWM0, 13000000, 0, &pxa27x_device_pwm0.dev), | 168 | static DEFINE_CKEN(pxa27x_usim, USIM, 48000000, 0); |
169 | INIT_CKEN("PWMCLK", PWM1, 13000000, 0, &pxa27x_device_pwm1.dev), | 169 | static DEFINE_CKEN(pxa27x_memstk, MEMSTK, 19500000, 0); |
170 | 170 | static DEFINE_CKEN(pxa27x_im, IM, 0, 0); | |
171 | INIT_CKEN("AC97CLK", AC97, 24576000, 0, NULL), | 171 | static DEFINE_CKEN(pxa27x_memc, MEMC, 0, 0); |
172 | INIT_CKEN("AC97CONFCLK", AC97CONF, 24576000, 0, NULL), | 172 | |
173 | 173 | static struct clk_lookup pxa27x_clkregs[] = { | |
174 | /* | 174 | INIT_CLKREG(&clk_pxa27x_lcd, "pxa2xx-fb", NULL), |
175 | INIT_CKEN("MSLCLK", MSL, 48000000, 0, NULL), | 175 | INIT_CLKREG(&clk_pxa27x_camera, "pxa27x-camera.0", NULL), |
176 | INIT_CKEN("USIMCLK", USIM, 48000000, 0, NULL), | 176 | INIT_CLKREG(&clk_pxa27x_ffuart, "pxa2xx-uart.0", NULL), |
177 | INIT_CKEN("MSTKCLK", MEMSTK, 19500000, 0, NULL), | 177 | INIT_CLKREG(&clk_pxa27x_btuart, "pxa2xx-uart.1", NULL), |
178 | INIT_CKEN("IMCLK", IM, 0, 0, NULL), | 178 | INIT_CLKREG(&clk_pxa27x_stuart, "pxa2xx-uart.2", NULL), |
179 | INIT_CKEN("MEMCLK", MEMC, 0, 0, NULL), | 179 | INIT_CLKREG(&clk_pxa27x_i2s, "pxa2xx-i2s", NULL), |
180 | */ | 180 | INIT_CLKREG(&clk_pxa27x_i2c, "pxa2xx-i2c.0", NULL), |
181 | INIT_CLKREG(&clk_pxa27x_usb, "pxa27x-udc", NULL), | ||
182 | INIT_CLKREG(&clk_pxa27x_mmc, "pxa2xx-mci.0", NULL), | ||
183 | INIT_CLKREG(&clk_pxa27x_stuart, "pxa2xx-ir", "UARTCLK"), | ||
184 | INIT_CLKREG(&clk_pxa27x_ficp, "pxa2xx-ir", "FICPCLK"), | ||
185 | INIT_CLKREG(&clk_pxa27x_usbhost, "pxa27x-ohci", NULL), | ||
186 | INIT_CLKREG(&clk_pxa27x_pwri2c, "pxa2xx-i2c.1", NULL), | ||
187 | INIT_CLKREG(&clk_pxa27x_keypad, "pxa27x-keypad", NULL), | ||
188 | INIT_CLKREG(&clk_pxa27x_ssp1, "pxa27x-ssp.0", NULL), | ||
189 | INIT_CLKREG(&clk_pxa27x_ssp2, "pxa27x-ssp.1", NULL), | ||
190 | INIT_CLKREG(&clk_pxa27x_ssp3, "pxa27x-ssp.2", NULL), | ||
191 | INIT_CLKREG(&clk_pxa27x_pwm0, "pxa27x-pwm.0", NULL), | ||
192 | INIT_CLKREG(&clk_pxa27x_pwm1, "pxa27x-pwm.1", NULL), | ||
193 | INIT_CLKREG(&clk_pxa27x_ac97, NULL, "AC97CLK"), | ||
194 | INIT_CLKREG(&clk_pxa27x_ac97conf, NULL, "AC97CONFCLK"), | ||
195 | INIT_CLKREG(&clk_pxa27x_msl, NULL, "MSLCLK"), | ||
196 | INIT_CLKREG(&clk_pxa27x_usim, NULL, "USIMCLK"), | ||
197 | INIT_CLKREG(&clk_pxa27x_memstk, NULL, "MSTKCLK"), | ||
198 | INIT_CLKREG(&clk_pxa27x_im, NULL, "IMCLK"), | ||
199 | INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"), | ||
181 | }; | 200 | }; |
182 | 201 | ||
183 | #ifdef CONFIG_PM | 202 | #ifdef CONFIG_PM |
@@ -380,7 +399,7 @@ static int __init pxa27x_init(void) | |||
380 | 399 | ||
381 | reset_status = RCSR; | 400 | reset_status = RCSR; |
382 | 401 | ||
383 | clks_register(pxa27x_clks, ARRAY_SIZE(pxa27x_clks)); | 402 | clks_register(pxa27x_clkregs, ARRAY_SIZE(pxa27x_clkregs)); |
384 | 403 | ||
385 | if ((ret = pxa_init_dma(32))) | 404 | if ((ret = pxa_init_dma(32))) |
386 | return ret; | 405 | return ret; |
diff --git a/arch/arm/mach-pxa/pxa300.c b/arch/arm/mach-pxa/pxa300.c index 9adc7fc4618a..f735e58e6669 100644 --- a/arch/arm/mach-pxa/pxa300.c +++ b/arch/arm/mach-pxa/pxa300.c | |||
@@ -85,14 +85,16 @@ static struct pxa3xx_mfp_addr_map pxa310_mfp_addr_map[] __initdata = { | |||
85 | MFP_ADDR_END, | 85 | MFP_ADDR_END, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | static struct clk common_clks[] = { | 88 | static DEFINE_PXA3_CKEN(common_nand, NAND, 156000000, 0); |
89 | PXA3xx_CKEN("NANDCLK", NAND, 156000000, 0, &pxa3xx_device_nand.dev), | 89 | |
90 | static struct clk_lookup common_clkregs[] = { | ||
91 | INIT_CLKREG(&clk_common_nand, "pxa3xx-nand", "NANDCLK"), | ||
90 | }; | 92 | }; |
91 | 93 | ||
92 | static struct clk pxa310_clks[] = { | 94 | static DEFINE_PXA3_CKEN(pxa310_mmc3, MMC3, 19500000, 0); |
93 | #ifdef CONFIG_CPU_PXA310 | 95 | |
94 | PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev), | 96 | static struct clk_lookup pxa310_clkregs[] = { |
95 | #endif | 97 | INIT_CLKREG(&clk_pxa310_mmc3, "pxa2xx-mci.2", "MMCCLK"), |
96 | }; | 98 | }; |
97 | 99 | ||
98 | static int __init pxa300_init(void) | 100 | static int __init pxa300_init(void) |
@@ -100,12 +102,12 @@ static int __init pxa300_init(void) | |||
100 | if (cpu_is_pxa300() || cpu_is_pxa310()) { | 102 | if (cpu_is_pxa300() || cpu_is_pxa310()) { |
101 | pxa3xx_init_mfp(); | 103 | pxa3xx_init_mfp(); |
102 | pxa3xx_mfp_init_addr(pxa300_mfp_addr_map); | 104 | pxa3xx_mfp_init_addr(pxa300_mfp_addr_map); |
103 | clks_register(ARRAY_AND_SIZE(common_clks)); | 105 | clks_register(ARRAY_AND_SIZE(common_clkregs)); |
104 | } | 106 | } |
105 | 107 | ||
106 | if (cpu_is_pxa310()) { | 108 | if (cpu_is_pxa310()) { |
107 | pxa3xx_mfp_init_addr(pxa310_mfp_addr_map); | 109 | pxa3xx_mfp_init_addr(pxa310_mfp_addr_map); |
108 | clks_register(ARRAY_AND_SIZE(pxa310_clks)); | 110 | clks_register(ARRAY_AND_SIZE(pxa310_clkregs)); |
109 | } | 111 | } |
110 | 112 | ||
111 | return 0; | 113 | return 0; |
diff --git a/arch/arm/mach-pxa/pxa320.c b/arch/arm/mach-pxa/pxa320.c index 016eb18f01a3..effe408c186f 100644 --- a/arch/arm/mach-pxa/pxa320.c +++ b/arch/arm/mach-pxa/pxa320.c | |||
@@ -80,8 +80,10 @@ static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = { | |||
80 | MFP_ADDR_END, | 80 | MFP_ADDR_END, |
81 | }; | 81 | }; |
82 | 82 | ||
83 | static struct clk pxa320_clks[] = { | 83 | static DEFINE_PXA3_CKEN(pxa320_nand, NAND, 104000000, 0); |
84 | PXA3xx_CKEN("NANDCLK", NAND, 104000000, 0, &pxa3xx_device_nand.dev), | 84 | |
85 | static struct clk_lookup pxa320_clkregs[] = { | ||
86 | INIT_CLKREG(&clk_pxa320_nand, "pxa3xx-nand", "NANDCLK"), | ||
85 | }; | 87 | }; |
86 | 88 | ||
87 | static int __init pxa320_init(void) | 89 | static int __init pxa320_init(void) |
@@ -89,7 +91,7 @@ static int __init pxa320_init(void) | |||
89 | if (cpu_is_pxa320()) { | 91 | if (cpu_is_pxa320()) { |
90 | pxa3xx_init_mfp(); | 92 | pxa3xx_init_mfp(); |
91 | pxa3xx_mfp_init_addr(pxa320_mfp_addr_map); | 93 | pxa3xx_mfp_init_addr(pxa320_mfp_addr_map); |
92 | clks_register(ARRAY_AND_SIZE(pxa320_clks)); | 94 | clks_register(ARRAY_AND_SIZE(pxa320_clkregs)); |
93 | } | 95 | } |
94 | 96 | ||
95 | return 0; | 97 | return 0; |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index b3cd5d0b0f35..b7e53829d376 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -216,43 +216,58 @@ static const struct clkops clk_dummy_ops = { | |||
216 | .disable = clk_dummy_disable, | 216 | .disable = clk_dummy_disable, |
217 | }; | 217 | }; |
218 | 218 | ||
219 | static struct clk pxa3xx_clks[] = { | 219 | static struct clk clk_pxa3xx_pout = { |
220 | { | 220 | .ops = &clk_pout_ops, |
221 | .name = "CLK_POUT", | 221 | .rate = 13000000, |
222 | .ops = &clk_pout_ops, | 222 | .delay = 70, |
223 | .rate = 13000000, | 223 | }; |
224 | .delay = 70, | ||
225 | }, | ||
226 | |||
227 | /* Power I2C clock is always on */ | ||
228 | { | ||
229 | .name = "I2CCLK", | ||
230 | .ops = &clk_dummy_ops, | ||
231 | .dev = &pxa3xx_device_i2c_power.dev, | ||
232 | }, | ||
233 | |||
234 | PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev), | ||
235 | PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL), | ||
236 | PXA3xx_CK("AC97CLK", AC97, &clk_pxa3xx_ac97_ops, NULL), | ||
237 | |||
238 | PXA3xx_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev), | ||
239 | PXA3xx_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev), | ||
240 | PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL), | ||
241 | |||
242 | PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), | ||
243 | PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa27x_device_udc.dev), | ||
244 | PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev), | ||
245 | PXA3xx_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev), | ||
246 | 224 | ||
247 | PXA3xx_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev), | 225 | static struct clk clk_dummy = { |
248 | PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev), | 226 | .ops = &clk_dummy_ops, |
249 | PXA3xx_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev), | 227 | }; |
250 | PXA3xx_CKEN("SSPCLK", SSP4, 13000000, 0, &pxa3xx_device_ssp4.dev), | ||
251 | PXA3xx_CKEN("PWMCLK", PWM0, 13000000, 0, &pxa27x_device_pwm0.dev), | ||
252 | PXA3xx_CKEN("PWMCLK", PWM1, 13000000, 0, &pxa27x_device_pwm1.dev), | ||
253 | 228 | ||
254 | PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev), | 229 | static DEFINE_PXA3_CK(pxa3xx_lcd, LCD, &clk_pxa3xx_hsio_ops); |
255 | PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev), | 230 | static DEFINE_PXA3_CK(pxa3xx_camera, CAMERA, &clk_pxa3xx_hsio_ops); |
231 | static DEFINE_PXA3_CK(pxa3xx_ac97, AC97, &clk_pxa3xx_ac97_ops); | ||
232 | static DEFINE_PXA3_CKEN(pxa3xx_ffuart, FFUART, 14857000, 1); | ||
233 | static DEFINE_PXA3_CKEN(pxa3xx_btuart, BTUART, 14857000, 1); | ||
234 | static DEFINE_PXA3_CKEN(pxa3xx_stuart, STUART, 14857000, 1); | ||
235 | static DEFINE_PXA3_CKEN(pxa3xx_i2c, I2C, 32842000, 0); | ||
236 | static DEFINE_PXA3_CKEN(pxa3xx_udc, UDC, 48000000, 5); | ||
237 | static DEFINE_PXA3_CKEN(pxa3xx_usbh, USBH, 48000000, 0); | ||
238 | static DEFINE_PXA3_CKEN(pxa3xx_keypad, KEYPAD, 32768, 0); | ||
239 | static DEFINE_PXA3_CKEN(pxa3xx_ssp1, SSP1, 13000000, 0); | ||
240 | static DEFINE_PXA3_CKEN(pxa3xx_ssp2, SSP2, 13000000, 0); | ||
241 | static DEFINE_PXA3_CKEN(pxa3xx_ssp3, SSP3, 13000000, 0); | ||
242 | static DEFINE_PXA3_CKEN(pxa3xx_ssp4, SSP4, 13000000, 0); | ||
243 | static DEFINE_PXA3_CKEN(pxa3xx_pwm0, PWM0, 13000000, 0); | ||
244 | static DEFINE_PXA3_CKEN(pxa3xx_pwm1, PWM1, 13000000, 0); | ||
245 | static DEFINE_PXA3_CKEN(pxa3xx_mmc1, MMC1, 19500000, 0); | ||
246 | static DEFINE_PXA3_CKEN(pxa3xx_mmc2, MMC2, 19500000, 0); | ||
247 | |||
248 | static struct clk_lookup pxa3xx_clkregs[] = { | ||
249 | INIT_CLKREG(&clk_pxa3xx_pout, NULL, "CLK_POUT"), | ||
250 | /* Power I2C clock is always on */ | ||
251 | INIT_CLKREG(&clk_dummy, "pxa2xx-i2c.1", NULL), | ||
252 | INIT_CLKREG(&clk_pxa3xx_lcd, "pxa2xx-fb", NULL), | ||
253 | INIT_CLKREG(&clk_pxa3xx_camera, NULL, "CAMCLK"), | ||
254 | INIT_CLKREG(&clk_pxa3xx_ac97, NULL, "AC97CLK"), | ||
255 | INIT_CLKREG(&clk_pxa3xx_ffuart, "pxa2xx-uart.0", NULL), | ||
256 | INIT_CLKREG(&clk_pxa3xx_btuart, "pxa2xx-uart.1", NULL), | ||
257 | INIT_CLKREG(&clk_pxa3xx_stuart, "pxa2xx-uart.2", NULL), | ||
258 | INIT_CLKREG(&clk_pxa3xx_stuart, "pxa2xx-ir", "UARTCLK"), | ||
259 | INIT_CLKREG(&clk_pxa3xx_i2c, "pxa2xx-i2c.0", NULL), | ||
260 | INIT_CLKREG(&clk_pxa3xx_udc, "pxa27x-udc", NULL), | ||
261 | INIT_CLKREG(&clk_pxa3xx_usbh, "pxa27x-ohci", NULL), | ||
262 | INIT_CLKREG(&clk_pxa3xx_keypad, "pxa27x-keypad", NULL), | ||
263 | INIT_CLKREG(&clk_pxa3xx_ssp1, "pxa27x-ssp.0", NULL), | ||
264 | INIT_CLKREG(&clk_pxa3xx_ssp2, "pxa27x-ssp.1", NULL), | ||
265 | INIT_CLKREG(&clk_pxa3xx_ssp3, "pxa27x-ssp.2", NULL), | ||
266 | INIT_CLKREG(&clk_pxa3xx_ssp4, "pxa27x-ssp.3", NULL), | ||
267 | INIT_CLKREG(&clk_pxa3xx_pwm0, "pxa27x-pwm.0", NULL), | ||
268 | INIT_CLKREG(&clk_pxa3xx_pwm1, "pxa27x-pwm.1", NULL), | ||
269 | INIT_CLKREG(&clk_pxa3xx_mmc1, "pxa2xx-mci.0", NULL), | ||
270 | INIT_CLKREG(&clk_pxa3xx_mmc2, "pxa2xx-mci.1", NULL), | ||
256 | }; | 271 | }; |
257 | 272 | ||
258 | #ifdef CONFIG_PM | 273 | #ifdef CONFIG_PM |
@@ -595,7 +610,7 @@ static int __init pxa3xx_init(void) | |||
595 | */ | 610 | */ |
596 | ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S); | 611 | ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S); |
597 | 612 | ||
598 | clks_register(pxa3xx_clks, ARRAY_SIZE(pxa3xx_clks)); | 613 | clks_register(pxa3xx_clkregs, ARRAY_SIZE(pxa3xx_clkregs)); |
599 | 614 | ||
600 | if ((ret = pxa_init_dma(32))) | 615 | if ((ret = pxa_init_dma(32))) |
601 | return ret; | 616 | return ret; |
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c index 2c31ec725688..6f42004db3ed 100644 --- a/arch/arm/mach-pxa/ssp.c +++ b/arch/arm/mach-pxa/ssp.c | |||
@@ -356,7 +356,7 @@ static int __devinit ssp_probe(struct platform_device *pdev, int type) | |||
356 | } | 356 | } |
357 | ssp->pdev = pdev; | 357 | ssp->pdev = pdev; |
358 | 358 | ||
359 | ssp->clk = clk_get(&pdev->dev, "SSPCLK"); | 359 | ssp->clk = clk_get(&pdev->dev, NULL); |
360 | if (IS_ERR(ssp->clk)) { | 360 | if (IS_ERR(ssp->clk)) { |
361 | ret = PTR_ERR(ssp->clk); | 361 | ret = PTR_ERR(ssp->clk); |
362 | goto err_free; | 362 | goto err_free; |
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig index 5ccde7cf39e8..603d1db9baf0 100644 --- a/arch/arm/mach-realview/Kconfig +++ b/arch/arm/mach-realview/Kconfig | |||
@@ -10,6 +10,7 @@ config MACH_REALVIEW_EB | |||
10 | config REALVIEW_EB_ARM11MP | 10 | config REALVIEW_EB_ARM11MP |
11 | bool "Support ARM11MPCore tile" | 11 | bool "Support ARM11MPCore tile" |
12 | depends on MACH_REALVIEW_EB | 12 | depends on MACH_REALVIEW_EB |
13 | select CPU_V6 | ||
13 | help | 14 | help |
14 | Enable support for the ARM11MPCore tile on the Realview platform. | 15 | Enable support for the ARM11MPCore tile on the Realview platform. |
15 | 16 | ||
@@ -33,6 +34,7 @@ config MACH_REALVIEW_PB11MP | |||
33 | 34 | ||
34 | config MACH_REALVIEW_PB1176 | 35 | config MACH_REALVIEW_PB1176 |
35 | bool "Support RealView/PB1176 platform" | 36 | bool "Support RealView/PB1176 platform" |
37 | select CPU_V6 | ||
36 | select ARM_GIC | 38 | select ARM_GIC |
37 | help | 39 | help |
38 | Include support for the ARM(R) RealView ARM1176 Platform Baseboard. | 40 | Include support for the ARM(R) RealView ARM1176 Platform Baseboard. |
diff --git a/arch/arm/mach-realview/clock.c b/arch/arm/mach-realview/clock.c index 3347c4236a60..a7043115de72 100644 --- a/arch/arm/mach-realview/clock.c +++ b/arch/arm/mach-realview/clock.c | |||
@@ -10,9 +10,11 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/device.h> | ||
13 | #include <linux/list.h> | 14 | #include <linux/list.h> |
14 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
15 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/string.h> | ||
16 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
17 | #include <linux/mutex.h> | 19 | #include <linux/mutex.h> |
18 | 20 | ||
@@ -20,32 +22,6 @@ | |||
20 | 22 | ||
21 | #include "clock.h" | 23 | #include "clock.h" |
22 | 24 | ||
23 | static LIST_HEAD(clocks); | ||
24 | static DEFINE_MUTEX(clocks_mutex); | ||
25 | |||
26 | struct clk *clk_get(struct device *dev, const char *id) | ||
27 | { | ||
28 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
29 | |||
30 | mutex_lock(&clocks_mutex); | ||
31 | list_for_each_entry(p, &clocks, node) { | ||
32 | if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | ||
33 | clk = p; | ||
34 | break; | ||
35 | } | ||
36 | } | ||
37 | mutex_unlock(&clocks_mutex); | ||
38 | |||
39 | return clk; | ||
40 | } | ||
41 | EXPORT_SYMBOL(clk_get); | ||
42 | |||
43 | void clk_put(struct clk *clk) | ||
44 | { | ||
45 | module_put(clk->owner); | ||
46 | } | ||
47 | EXPORT_SYMBOL(clk_put); | ||
48 | |||
49 | int clk_enable(struct clk *clk) | 25 | int clk_enable(struct clk *clk) |
50 | { | 26 | { |
51 | return 0; | 27 | return 0; |
@@ -65,7 +41,9 @@ EXPORT_SYMBOL(clk_get_rate); | |||
65 | 41 | ||
66 | long clk_round_rate(struct clk *clk, unsigned long rate) | 42 | long clk_round_rate(struct clk *clk, unsigned long rate) |
67 | { | 43 | { |
68 | return rate; | 44 | struct icst307_vco vco; |
45 | vco = icst307_khz_to_vco(clk->params, rate / 1000); | ||
46 | return icst307_khz(clk->params, vco) * 1000; | ||
69 | } | 47 | } |
70 | EXPORT_SYMBOL(clk_round_rate); | 48 | EXPORT_SYMBOL(clk_round_rate); |
71 | 49 | ||
@@ -78,57 +56,9 @@ int clk_set_rate(struct clk *clk, unsigned long rate) | |||
78 | 56 | ||
79 | vco = icst307_khz_to_vco(clk->params, rate / 1000); | 57 | vco = icst307_khz_to_vco(clk->params, rate / 1000); |
80 | clk->rate = icst307_khz(clk->params, vco) * 1000; | 58 | clk->rate = icst307_khz(clk->params, vco) * 1000; |
81 | |||
82 | printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n", | ||
83 | clk->name, vco.s, vco.r, vco.v); | ||
84 | |||
85 | clk->setvco(clk, vco); | 59 | clk->setvco(clk, vco); |
86 | ret = 0; | 60 | ret = 0; |
87 | } | 61 | } |
88 | return ret; | 62 | return ret; |
89 | } | 63 | } |
90 | EXPORT_SYMBOL(clk_set_rate); | 64 | EXPORT_SYMBOL(clk_set_rate); |
91 | |||
92 | /* | ||
93 | * These are fixed clocks. | ||
94 | */ | ||
95 | static struct clk kmi_clk = { | ||
96 | .name = "KMIREFCLK", | ||
97 | .rate = 24000000, | ||
98 | }; | ||
99 | |||
100 | static struct clk uart_clk = { | ||
101 | .name = "UARTCLK", | ||
102 | .rate = 24000000, | ||
103 | }; | ||
104 | |||
105 | static struct clk mmci_clk = { | ||
106 | .name = "MCLK", | ||
107 | .rate = 24000000, | ||
108 | }; | ||
109 | |||
110 | int clk_register(struct clk *clk) | ||
111 | { | ||
112 | mutex_lock(&clocks_mutex); | ||
113 | list_add(&clk->node, &clocks); | ||
114 | mutex_unlock(&clocks_mutex); | ||
115 | return 0; | ||
116 | } | ||
117 | EXPORT_SYMBOL(clk_register); | ||
118 | |||
119 | void clk_unregister(struct clk *clk) | ||
120 | { | ||
121 | mutex_lock(&clocks_mutex); | ||
122 | list_del(&clk->node); | ||
123 | mutex_unlock(&clocks_mutex); | ||
124 | } | ||
125 | EXPORT_SYMBOL(clk_unregister); | ||
126 | |||
127 | static int __init clk_init(void) | ||
128 | { | ||
129 | clk_register(&kmi_clk); | ||
130 | clk_register(&uart_clk); | ||
131 | clk_register(&mmci_clk); | ||
132 | return 0; | ||
133 | } | ||
134 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-realview/clock.h b/arch/arm/mach-realview/clock.h index dadba695e181..ebbb0f06b600 100644 --- a/arch/arm/mach-realview/clock.h +++ b/arch/arm/mach-realview/clock.h | |||
@@ -12,14 +12,8 @@ struct module; | |||
12 | struct icst307_params; | 12 | struct icst307_params; |
13 | 13 | ||
14 | struct clk { | 14 | struct clk { |
15 | struct list_head node; | ||
16 | unsigned long rate; | 15 | unsigned long rate; |
17 | struct module *owner; | ||
18 | const char *name; | ||
19 | const struct icst307_params *params; | 16 | const struct icst307_params *params; |
20 | void *data; | 17 | void *data; |
21 | void (*setvco)(struct clk *, struct icst307_vco vco); | 18 | void (*setvco)(struct clk *, struct icst307_vco vco); |
22 | }; | 19 | }; |
23 | |||
24 | int clk_register(struct clk *clk); | ||
25 | void clk_unregister(struct clk *clk); | ||
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 2f04d54711e7..2491374818e9 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/clockchips.h> | 29 | #include <linux/clockchips.h> |
30 | #include <linux/io.h> | 30 | #include <linux/io.h> |
31 | 31 | ||
32 | #include <asm/clkdev.h> | ||
32 | #include <asm/system.h> | 33 | #include <asm/system.h> |
33 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
34 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
@@ -188,13 +189,60 @@ static void realview_oscvco_set(struct clk *clk, struct icst307_vco vco) | |||
188 | writel(0, sys_lock); | 189 | writel(0, sys_lock); |
189 | } | 190 | } |
190 | 191 | ||
191 | struct clk realview_clcd_clk = { | 192 | static struct clk oscvco_clk = { |
192 | .name = "CLCDCLK", | ||
193 | .params = &realview_oscvco_params, | 193 | .params = &realview_oscvco_params, |
194 | .setvco = realview_oscvco_set, | 194 | .setvco = realview_oscvco_set, |
195 | }; | 195 | }; |
196 | 196 | ||
197 | /* | 197 | /* |
198 | * These are fixed clocks. | ||
199 | */ | ||
200 | static struct clk ref24_clk = { | ||
201 | .rate = 24000000, | ||
202 | }; | ||
203 | |||
204 | static struct clk_lookup lookups[] = { | ||
205 | { /* UART0 */ | ||
206 | .dev_id = "dev:f1", | ||
207 | .clk = &ref24_clk, | ||
208 | }, { /* UART1 */ | ||
209 | .dev_id = "dev:f2", | ||
210 | .clk = &ref24_clk, | ||
211 | }, { /* UART2 */ | ||
212 | .dev_id = "dev:f3", | ||
213 | .clk = &ref24_clk, | ||
214 | }, { /* UART3 */ | ||
215 | .dev_id = "fpga:09", | ||
216 | .clk = &ref24_clk, | ||
217 | }, { /* KMI0 */ | ||
218 | .dev_id = "fpga:06", | ||
219 | .clk = &ref24_clk, | ||
220 | }, { /* KMI1 */ | ||
221 | .dev_id = "fpga:07", | ||
222 | .clk = &ref24_clk, | ||
223 | }, { /* MMC0 */ | ||
224 | .dev_id = "fpga:05", | ||
225 | .clk = &ref24_clk, | ||
226 | }, { /* EB:CLCD */ | ||
227 | .dev_id = "dev:20", | ||
228 | .clk = &oscvco_clk, | ||
229 | }, { /* PB:CLCD */ | ||
230 | .dev_id = "issp:20", | ||
231 | .clk = &oscvco_clk, | ||
232 | } | ||
233 | }; | ||
234 | |||
235 | static int __init clk_init(void) | ||
236 | { | ||
237 | int i; | ||
238 | |||
239 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | ||
240 | clkdev_add(&lookups[i]); | ||
241 | return 0; | ||
242 | } | ||
243 | arch_initcall(clk_init); | ||
244 | |||
245 | /* | ||
198 | * CLCD support. | 246 | * CLCD support. |
199 | */ | 247 | */ |
200 | #define SYS_CLCD_NLCDIOON (1 << 2) | 248 | #define SYS_CLCD_NLCDIOON (1 << 2) |
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h index 3cea92c70d8f..614e8cb31713 100644 --- a/arch/arm/mach-realview/core.h +++ b/arch/arm/mach-realview/core.h | |||
@@ -48,7 +48,6 @@ extern struct platform_device realview_flash_device; | |||
48 | extern struct platform_device realview_i2c_device; | 48 | extern struct platform_device realview_i2c_device; |
49 | extern struct mmc_platform_data realview_mmc0_plat_data; | 49 | extern struct mmc_platform_data realview_mmc0_plat_data; |
50 | extern struct mmc_platform_data realview_mmc1_plat_data; | 50 | extern struct mmc_platform_data realview_mmc1_plat_data; |
51 | extern struct clk realview_clcd_clk; | ||
52 | extern struct clcd_board clcd_plat_data; | 51 | extern struct clcd_board clcd_plat_data; |
53 | extern void __iomem *gic_cpu_base_addr; | 52 | extern void __iomem *gic_cpu_base_addr; |
54 | #ifdef CONFIG_LOCAL_TIMERS | 53 | #ifdef CONFIG_LOCAL_TIMERS |
diff --git a/arch/arm/mach-realview/include/mach/clkdev.h b/arch/arm/mach-realview/include/mach/clkdev.h new file mode 100644 index 000000000000..04b37a89801c --- /dev/null +++ b/arch/arm/mach-realview/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | ||
2 | #define __ASM_MACH_CLKDEV_H | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do { } while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index eb829eb1ebe2..3420e2e719e6 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -372,8 +372,6 @@ static void __init realview_eb_init(void) | |||
372 | #endif | 372 | #endif |
373 | } | 373 | } |
374 | 374 | ||
375 | clk_register(&realview_clcd_clk); | ||
376 | |||
377 | realview_flash_register(&realview_eb_flash_resource, 1); | 375 | realview_flash_register(&realview_eb_flash_resource, 1); |
378 | platform_device_register(&realview_i2c_device); | 376 | platform_device_register(&realview_i2c_device); |
379 | eth_device_register(); | 377 | eth_device_register(); |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index cccdb3eb90fe..0481416d37c9 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -265,8 +265,6 @@ static void __init realview_pb1176_init(void) | |||
265 | l2x0_init(__io_address(REALVIEW_PB1176_L220_BASE), 0x00730000, 0xfe000fff); | 265 | l2x0_init(__io_address(REALVIEW_PB1176_L220_BASE), 0x00730000, 0xfe000fff); |
266 | #endif | 266 | #endif |
267 | 267 | ||
268 | clk_register(&realview_clcd_clk); | ||
269 | |||
270 | realview_flash_register(&realview_pb1176_flash_resource, 1); | 268 | realview_flash_register(&realview_pb1176_flash_resource, 1); |
271 | platform_device_register(&realview_pb1176_smsc911x_device); | 269 | platform_device_register(&realview_pb1176_smsc911x_device); |
272 | 270 | ||
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index 8b863148ec18..6197dd8e8edf 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -312,8 +312,6 @@ static void __init realview_pb11mp_init(void) | |||
312 | l2x0_init(__io_address(REALVIEW_TC11MP_L220_BASE), 0x00790000, 0xfe000fff); | 312 | l2x0_init(__io_address(REALVIEW_TC11MP_L220_BASE), 0x00790000, 0xfe000fff); |
313 | #endif | 313 | #endif |
314 | 314 | ||
315 | clk_register(&realview_clcd_clk); | ||
316 | |||
317 | realview_flash_register(realview_pb11mp_flash_resource, | 315 | realview_flash_register(realview_pb11mp_flash_resource, |
318 | ARRAY_SIZE(realview_pb11mp_flash_resource)); | 316 | ARRAY_SIZE(realview_pb11mp_flash_resource)); |
319 | platform_device_register(&realview_pb11mp_smsc911x_device); | 317 | platform_device_register(&realview_pb11mp_smsc911x_device); |
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index 99fdc736698c..7315569fbfd7 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig | |||
@@ -7,6 +7,7 @@ | |||
7 | config CPU_S3C2410 | 7 | config CPU_S3C2410 |
8 | bool | 8 | bool |
9 | depends on ARCH_S3C2410 | 9 | depends on ARCH_S3C2410 |
10 | select CPU_ARM920T | ||
10 | select S3C2410_CLOCK | 11 | select S3C2410_CLOCK |
11 | select S3C2410_GPIO | 12 | select S3C2410_GPIO |
12 | select CPU_LLSERIAL_S3C2410 | 13 | select CPU_LLSERIAL_S3C2410 |
diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig index c59a9d2ee9a6..ca99564ae4b5 100644 --- a/arch/arm/mach-s3c2412/Kconfig +++ b/arch/arm/mach-s3c2412/Kconfig | |||
@@ -7,6 +7,7 @@ | |||
7 | config CPU_S3C2412 | 7 | config CPU_S3C2412 |
8 | bool | 8 | bool |
9 | depends on ARCH_S3C2410 | 9 | depends on ARCH_S3C2410 |
10 | select CPU_ARM926T | ||
10 | select CPU_LLSERIAL_S3C2440 | 11 | select CPU_LLSERIAL_S3C2440 |
11 | select S3C2412_PM if PM | 12 | select S3C2412_PM if PM |
12 | select S3C2412_DMA if S3C2410_DMA | 13 | select S3C2412_DMA if S3C2410_DMA |
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig index 25de042ab996..0429d255b0d8 100644 --- a/arch/arm/mach-s3c2440/Kconfig +++ b/arch/arm/mach-s3c2440/Kconfig | |||
@@ -7,6 +7,7 @@ | |||
7 | config CPU_S3C2440 | 7 | config CPU_S3C2440 |
8 | bool | 8 | bool |
9 | depends on ARCH_S3C2410 | 9 | depends on ARCH_S3C2410 |
10 | select CPU_ARM920T | ||
10 | select S3C2410_CLOCK | 11 | select S3C2410_CLOCK |
11 | select S3C2410_PM if PM | 12 | select S3C2410_PM if PM |
12 | select S3C2410_GPIO | 13 | select S3C2410_GPIO |
diff --git a/arch/arm/mach-s3c2442/Kconfig b/arch/arm/mach-s3c2442/Kconfig index 26d131a77074..b289d198020e 100644 --- a/arch/arm/mach-s3c2442/Kconfig +++ b/arch/arm/mach-s3c2442/Kconfig | |||
@@ -7,6 +7,7 @@ | |||
7 | config CPU_S3C2442 | 7 | config CPU_S3C2442 |
8 | bool | 8 | bool |
9 | depends on ARCH_S3C2410 | 9 | depends on ARCH_S3C2410 |
10 | select CPU_ARM920T | ||
10 | select S3C2410_CLOCK | 11 | select S3C2410_CLOCK |
11 | select S3C2410_GPIO | 12 | select S3C2410_GPIO |
12 | select S3C2410_PM if PM | 13 | select S3C2410_PM if PM |
diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c index 43c30f84abf2..dab3c6347a8f 100644 --- a/arch/arm/mach-sa1100/clock.c +++ b/arch/arm/mach-sa1100/clock.c | |||
@@ -3,6 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | #include <linux/module.h> | 4 | #include <linux/module.h> |
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/device.h> | ||
6 | #include <linux/list.h> | 7 | #include <linux/list.h> |
7 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
8 | #include <linux/err.h> | 9 | #include <linux/err.h> |
@@ -14,36 +15,39 @@ | |||
14 | #include <mach/hardware.h> | 15 | #include <mach/hardware.h> |
15 | 16 | ||
16 | /* | 17 | /* |
17 | * Very simple clock implementation - we only have one clock to | 18 | * Very simple clock implementation - we only have one clock to deal with. |
18 | * deal with at the moment, so we only match using the "name". | ||
19 | */ | 19 | */ |
20 | struct clk { | 20 | struct clk { |
21 | struct list_head node; | ||
22 | unsigned long rate; | ||
23 | const char *name; | ||
24 | unsigned int enabled; | 21 | unsigned int enabled; |
25 | void (*enable)(void); | ||
26 | void (*disable)(void); | ||
27 | }; | 22 | }; |
28 | 23 | ||
29 | static LIST_HEAD(clocks); | 24 | static void clk_gpio27_enable(void) |
30 | static DEFINE_MUTEX(clocks_mutex); | 25 | { |
26 | /* | ||
27 | * First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111: | ||
28 | * (SA-1110 Developer's Manual, section 9.1.2.1) | ||
29 | */ | ||
30 | GAFR |= GPIO_32_768kHz; | ||
31 | GPDR |= GPIO_32_768kHz; | ||
32 | TUCR = TUCR_3_6864MHz; | ||
33 | } | ||
34 | |||
35 | static void clk_gpio27_disable(void) | ||
36 | { | ||
37 | TUCR = 0; | ||
38 | GPDR &= ~GPIO_32_768kHz; | ||
39 | GAFR &= ~GPIO_32_768kHz; | ||
40 | } | ||
41 | |||
42 | static struct clk clk_gpio27; | ||
43 | |||
31 | static DEFINE_SPINLOCK(clocks_lock); | 44 | static DEFINE_SPINLOCK(clocks_lock); |
32 | 45 | ||
33 | struct clk *clk_get(struct device *dev, const char *id) | 46 | struct clk *clk_get(struct device *dev, const char *id) |
34 | { | 47 | { |
35 | struct clk *p, *clk = ERR_PTR(-ENOENT); | 48 | const char *devname = dev_name(dev); |
36 | |||
37 | mutex_lock(&clocks_mutex); | ||
38 | list_for_each_entry(p, &clocks, node) { | ||
39 | if (strcmp(id, p->name) == 0) { | ||
40 | clk = p; | ||
41 | break; | ||
42 | } | ||
43 | } | ||
44 | mutex_unlock(&clocks_mutex); | ||
45 | 49 | ||
46 | return clk; | 50 | return strcmp(devname, "sa1111.0") ? ERR_PTR(-ENOENT) : &clk_gpio27; |
47 | } | 51 | } |
48 | EXPORT_SYMBOL(clk_get); | 52 | EXPORT_SYMBOL(clk_get); |
49 | 53 | ||
@@ -58,7 +62,7 @@ int clk_enable(struct clk *clk) | |||
58 | 62 | ||
59 | spin_lock_irqsave(&clocks_lock, flags); | 63 | spin_lock_irqsave(&clocks_lock, flags); |
60 | if (clk->enabled++ == 0) | 64 | if (clk->enabled++ == 0) |
61 | clk->enable(); | 65 | clk_gpio27_enable(); |
62 | spin_unlock_irqrestore(&clocks_lock, flags); | 66 | spin_unlock_irqrestore(&clocks_lock, flags); |
63 | return 0; | 67 | return 0; |
64 | } | 68 | } |
@@ -72,63 +76,13 @@ void clk_disable(struct clk *clk) | |||
72 | 76 | ||
73 | spin_lock_irqsave(&clocks_lock, flags); | 77 | spin_lock_irqsave(&clocks_lock, flags); |
74 | if (--clk->enabled == 0) | 78 | if (--clk->enabled == 0) |
75 | clk->disable(); | 79 | clk_gpio27_disable(); |
76 | spin_unlock_irqrestore(&clocks_lock, flags); | 80 | spin_unlock_irqrestore(&clocks_lock, flags); |
77 | } | 81 | } |
78 | EXPORT_SYMBOL(clk_disable); | 82 | EXPORT_SYMBOL(clk_disable); |
79 | 83 | ||
80 | unsigned long clk_get_rate(struct clk *clk) | 84 | unsigned long clk_get_rate(struct clk *clk) |
81 | { | 85 | { |
82 | return clk->rate; | 86 | return 3686400; |
83 | } | 87 | } |
84 | EXPORT_SYMBOL(clk_get_rate); | 88 | EXPORT_SYMBOL(clk_get_rate); |
85 | |||
86 | |||
87 | static void clk_gpio27_enable(void) | ||
88 | { | ||
89 | /* | ||
90 | * First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111: | ||
91 | * (SA-1110 Developer's Manual, section 9.1.2.1) | ||
92 | */ | ||
93 | GAFR |= GPIO_32_768kHz; | ||
94 | GPDR |= GPIO_32_768kHz; | ||
95 | TUCR = TUCR_3_6864MHz; | ||
96 | } | ||
97 | |||
98 | static void clk_gpio27_disable(void) | ||
99 | { | ||
100 | TUCR = 0; | ||
101 | GPDR &= ~GPIO_32_768kHz; | ||
102 | GAFR &= ~GPIO_32_768kHz; | ||
103 | } | ||
104 | |||
105 | static struct clk clk_gpio27 = { | ||
106 | .name = "SA1111_CLK", | ||
107 | .rate = 3686400, | ||
108 | .enable = clk_gpio27_enable, | ||
109 | .disable = clk_gpio27_disable, | ||
110 | }; | ||
111 | |||
112 | int clk_register(struct clk *clk) | ||
113 | { | ||
114 | mutex_lock(&clocks_mutex); | ||
115 | list_add(&clk->node, &clocks); | ||
116 | mutex_unlock(&clocks_mutex); | ||
117 | return 0; | ||
118 | } | ||
119 | EXPORT_SYMBOL(clk_register); | ||
120 | |||
121 | void clk_unregister(struct clk *clk) | ||
122 | { | ||
123 | mutex_lock(&clocks_mutex); | ||
124 | list_del(&clk->node); | ||
125 | mutex_unlock(&clocks_mutex); | ||
126 | } | ||
127 | EXPORT_SYMBOL(clk_unregister); | ||
128 | |||
129 | static int __init clk_init(void) | ||
130 | { | ||
131 | clk_register(&clk_gpio27); | ||
132 | return 0; | ||
133 | } | ||
134 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig index 95096afd5271..c781f30c8368 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig | |||
@@ -3,12 +3,14 @@ menu "Versatile platform type" | |||
3 | 3 | ||
4 | config ARCH_VERSATILE_PB | 4 | config ARCH_VERSATILE_PB |
5 | bool "Support Versatile/PB platform" | 5 | bool "Support Versatile/PB platform" |
6 | select CPU_ARM926T | ||
6 | default y | 7 | default y |
7 | help | 8 | help |
8 | Include support for the ARM(R) Versatile/PB platform. | 9 | Include support for the ARM(R) Versatile/PB platform. |
9 | 10 | ||
10 | config MACH_VERSATILE_AB | 11 | config MACH_VERSATILE_AB |
11 | bool "Support Versatile/AB platform" | 12 | bool "Support Versatile/AB platform" |
13 | select CPU_ARM926T | ||
12 | help | 14 | help |
13 | Include support for the ARM(R) Versatile/AP platform. | 15 | Include support for the ARM(R) Versatile/AP platform. |
14 | 16 | ||
diff --git a/arch/arm/mach-versatile/clock.c b/arch/arm/mach-versatile/clock.c index 58937f1fb38c..c50a44ea7ee6 100644 --- a/arch/arm/mach-versatile/clock.c +++ b/arch/arm/mach-versatile/clock.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/device.h> | ||
13 | #include <linux/list.h> | 14 | #include <linux/list.h> |
14 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
15 | #include <linux/err.h> | 16 | #include <linux/err.h> |
@@ -17,36 +18,11 @@ | |||
17 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
18 | #include <linux/mutex.h> | 19 | #include <linux/mutex.h> |
19 | 20 | ||
21 | #include <asm/clkdev.h> | ||
20 | #include <asm/hardware/icst307.h> | 22 | #include <asm/hardware/icst307.h> |
21 | 23 | ||
22 | #include "clock.h" | 24 | #include "clock.h" |
23 | 25 | ||
24 | static LIST_HEAD(clocks); | ||
25 | static DEFINE_MUTEX(clocks_mutex); | ||
26 | |||
27 | struct clk *clk_get(struct device *dev, const char *id) | ||
28 | { | ||
29 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
30 | |||
31 | mutex_lock(&clocks_mutex); | ||
32 | list_for_each_entry(p, &clocks, node) { | ||
33 | if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | ||
34 | clk = p; | ||
35 | break; | ||
36 | } | ||
37 | } | ||
38 | mutex_unlock(&clocks_mutex); | ||
39 | |||
40 | return clk; | ||
41 | } | ||
42 | EXPORT_SYMBOL(clk_get); | ||
43 | |||
44 | void clk_put(struct clk *clk) | ||
45 | { | ||
46 | module_put(clk->owner); | ||
47 | } | ||
48 | EXPORT_SYMBOL(clk_put); | ||
49 | |||
50 | int clk_enable(struct clk *clk) | 26 | int clk_enable(struct clk *clk) |
51 | { | 27 | { |
52 | return 0; | 28 | return 0; |
@@ -66,7 +42,9 @@ EXPORT_SYMBOL(clk_get_rate); | |||
66 | 42 | ||
67 | long clk_round_rate(struct clk *clk, unsigned long rate) | 43 | long clk_round_rate(struct clk *clk, unsigned long rate) |
68 | { | 44 | { |
69 | return rate; | 45 | struct icst307_vco vco; |
46 | vco = icst307_khz_to_vco(clk->params, rate / 1000); | ||
47 | return icst307_khz(clk->params, vco) * 1000; | ||
70 | } | 48 | } |
71 | EXPORT_SYMBOL(clk_round_rate); | 49 | EXPORT_SYMBOL(clk_round_rate); |
72 | 50 | ||
@@ -79,57 +57,9 @@ int clk_set_rate(struct clk *clk, unsigned long rate) | |||
79 | 57 | ||
80 | vco = icst307_khz_to_vco(clk->params, rate / 1000); | 58 | vco = icst307_khz_to_vco(clk->params, rate / 1000); |
81 | clk->rate = icst307_khz(clk->params, vco) * 1000; | 59 | clk->rate = icst307_khz(clk->params, vco) * 1000; |
82 | |||
83 | printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n", | ||
84 | clk->name, vco.s, vco.r, vco.v); | ||
85 | |||
86 | clk->setvco(clk, vco); | 60 | clk->setvco(clk, vco); |
87 | ret = 0; | 61 | ret = 0; |
88 | } | 62 | } |
89 | return ret; | 63 | return ret; |
90 | } | 64 | } |
91 | EXPORT_SYMBOL(clk_set_rate); | 65 | EXPORT_SYMBOL(clk_set_rate); |
92 | |||
93 | /* | ||
94 | * These are fixed clocks. | ||
95 | */ | ||
96 | static struct clk kmi_clk = { | ||
97 | .name = "KMIREFCLK", | ||
98 | .rate = 24000000, | ||
99 | }; | ||
100 | |||
101 | static struct clk uart_clk = { | ||
102 | .name = "UARTCLK", | ||
103 | .rate = 24000000, | ||
104 | }; | ||
105 | |||
106 | static struct clk mmci_clk = { | ||
107 | .name = "MCLK", | ||
108 | .rate = 24000000, | ||
109 | }; | ||
110 | |||
111 | int clk_register(struct clk *clk) | ||
112 | { | ||
113 | mutex_lock(&clocks_mutex); | ||
114 | list_add(&clk->node, &clocks); | ||
115 | mutex_unlock(&clocks_mutex); | ||
116 | return 0; | ||
117 | } | ||
118 | EXPORT_SYMBOL(clk_register); | ||
119 | |||
120 | void clk_unregister(struct clk *clk) | ||
121 | { | ||
122 | mutex_lock(&clocks_mutex); | ||
123 | list_del(&clk->node); | ||
124 | mutex_unlock(&clocks_mutex); | ||
125 | } | ||
126 | EXPORT_SYMBOL(clk_unregister); | ||
127 | |||
128 | static int __init clk_init(void) | ||
129 | { | ||
130 | clk_register(&kmi_clk); | ||
131 | clk_register(&uart_clk); | ||
132 | clk_register(&mmci_clk); | ||
133 | return 0; | ||
134 | } | ||
135 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-versatile/clock.h b/arch/arm/mach-versatile/clock.h index 8b0b61dd17e4..03468fdc3e58 100644 --- a/arch/arm/mach-versatile/clock.h +++ b/arch/arm/mach-versatile/clock.h | |||
@@ -12,14 +12,9 @@ struct module; | |||
12 | struct icst307_params; | 12 | struct icst307_params; |
13 | 13 | ||
14 | struct clk { | 14 | struct clk { |
15 | struct list_head node; | ||
16 | unsigned long rate; | 15 | unsigned long rate; |
17 | struct module *owner; | ||
18 | const char *name; | ||
19 | const struct icst307_params *params; | 16 | const struct icst307_params *params; |
17 | u32 oscoff; | ||
20 | void *data; | 18 | void *data; |
21 | void (*setvco)(struct clk *, struct icst307_vco vco); | 19 | void (*setvco)(struct clk *, struct icst307_vco vco); |
22 | }; | 20 | }; |
23 | |||
24 | int clk_register(struct clk *clk); | ||
25 | void clk_unregister(struct clk *clk); | ||
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 565e0ba0d67e..df25aa138509 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/cnt32_to_63.h> | 31 | #include <linux/cnt32_to_63.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | 33 | ||
34 | #include <asm/clkdev.h> | ||
34 | #include <asm/system.h> | 35 | #include <asm/system.h> |
35 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
36 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
@@ -373,22 +374,60 @@ static const struct icst307_params versatile_oscvco_params = { | |||
373 | 374 | ||
374 | static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco) | 375 | static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco) |
375 | { | 376 | { |
376 | void __iomem *sys_lock = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LOCK_OFFSET; | 377 | void __iomem *sys = __io_address(VERSATILE_SYS_BASE); |
377 | void __iomem *sys_osc = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSCCLCD_OFFSET; | 378 | void __iomem *sys_lock = sys + VERSATILE_SYS_LOCK_OFFSET; |
378 | u32 val; | 379 | u32 val; |
379 | 380 | ||
380 | val = readl(sys_osc) & ~0x7ffff; | 381 | val = readl(sys + clk->oscoff) & ~0x7ffff; |
381 | val |= vco.v | (vco.r << 9) | (vco.s << 16); | 382 | val |= vco.v | (vco.r << 9) | (vco.s << 16); |
382 | 383 | ||
383 | writel(0xa05f, sys_lock); | 384 | writel(0xa05f, sys_lock); |
384 | writel(val, sys_osc); | 385 | writel(val, sys + clk->oscoff); |
385 | writel(0, sys_lock); | 386 | writel(0, sys_lock); |
386 | } | 387 | } |
387 | 388 | ||
388 | static struct clk versatile_clcd_clk = { | 389 | static struct clk osc4_clk = { |
389 | .name = "CLCDCLK", | ||
390 | .params = &versatile_oscvco_params, | 390 | .params = &versatile_oscvco_params, |
391 | .setvco = versatile_oscvco_set, | 391 | .oscoff = VERSATILE_SYS_OSCCLCD_OFFSET, |
392 | .setvco = versatile_oscvco_set, | ||
393 | }; | ||
394 | |||
395 | /* | ||
396 | * These are fixed clocks. | ||
397 | */ | ||
398 | static struct clk ref24_clk = { | ||
399 | .rate = 24000000, | ||
400 | }; | ||
401 | |||
402 | static struct clk_lookup lookups[] __initdata = { | ||
403 | { /* UART0 */ | ||
404 | .dev_id = "dev:f1", | ||
405 | .clk = &ref24_clk, | ||
406 | }, { /* UART1 */ | ||
407 | .dev_id = "dev:f2", | ||
408 | .clk = &ref24_clk, | ||
409 | }, { /* UART2 */ | ||
410 | .dev_id = "dev:f3", | ||
411 | .clk = &ref24_clk, | ||
412 | }, { /* UART3 */ | ||
413 | .dev_id = "fpga:09", | ||
414 | .clk = &ref24_clk, | ||
415 | }, { /* KMI0 */ | ||
416 | .dev_id = "fpga:06", | ||
417 | .clk = &ref24_clk, | ||
418 | }, { /* KMI1 */ | ||
419 | .dev_id = "fpga:07", | ||
420 | .clk = &ref24_clk, | ||
421 | }, { /* MMC0 */ | ||
422 | .dev_id = "fpga:05", | ||
423 | .clk = &ref24_clk, | ||
424 | }, { /* MMC1 */ | ||
425 | .dev_id = "fpga:0b", | ||
426 | .clk = &ref24_clk, | ||
427 | }, { /* CLCD */ | ||
428 | .dev_id = "dev:20", | ||
429 | .clk = &osc4_clk, | ||
430 | } | ||
392 | }; | 431 | }; |
393 | 432 | ||
394 | /* | 433 | /* |
@@ -786,7 +825,8 @@ void __init versatile_init(void) | |||
786 | { | 825 | { |
787 | int i; | 826 | int i; |
788 | 827 | ||
789 | clk_register(&versatile_clcd_clk); | 828 | for (i = 0; i < ARRAY_SIZE(lookups); i++) |
829 | clkdev_add(&lookups[i]); | ||
790 | 830 | ||
791 | platform_device_register(&versatile_flash_device); | 831 | platform_device_register(&versatile_flash_device); |
792 | platform_device_register(&versatile_i2c_device); | 832 | platform_device_register(&versatile_i2c_device); |
diff --git a/arch/arm/mach-versatile/include/mach/clkdev.h b/arch/arm/mach-versatile/include/mach/clkdev.h new file mode 100644 index 000000000000..04b37a89801c --- /dev/null +++ b/arch/arm/mach-versatile/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | ||
2 | #define __ASM_MACH_CLKDEV_H | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do { } while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index ab5f7a21350b..cf44de512830 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -10,8 +10,7 @@ config CPU_32 | |||
10 | 10 | ||
11 | # ARM610 | 11 | # ARM610 |
12 | config CPU_ARM610 | 12 | config CPU_ARM610 |
13 | bool "Support ARM610 processor" | 13 | bool "Support ARM610 processor" if ARCH_RPC |
14 | depends on ARCH_RPC | ||
15 | select CPU_32v3 | 14 | select CPU_32v3 |
16 | select CPU_CACHE_V3 | 15 | select CPU_CACHE_V3 |
17 | select CPU_CACHE_VIVT | 16 | select CPU_CACHE_VIVT |
@@ -43,8 +42,7 @@ config CPU_ARM7TDMI | |||
43 | 42 | ||
44 | # ARM710 | 43 | # ARM710 |
45 | config CPU_ARM710 | 44 | config CPU_ARM710 |
46 | bool "Support ARM710 processor" if !ARCH_CLPS7500 && ARCH_RPC | 45 | bool "Support ARM710 processor" if ARCH_RPC |
47 | default y if ARCH_CLPS7500 | ||
48 | select CPU_32v3 | 46 | select CPU_32v3 |
49 | select CPU_CACHE_V3 | 47 | select CPU_CACHE_V3 |
50 | select CPU_CACHE_VIVT | 48 | select CPU_CACHE_VIVT |
@@ -63,8 +61,7 @@ config CPU_ARM710 | |||
63 | 61 | ||
64 | # ARM720T | 62 | # ARM720T |
65 | config CPU_ARM720T | 63 | config CPU_ARM720T |
66 | bool "Support ARM720T processor" if !ARCH_CLPS711X && !ARCH_L7200 && !ARCH_CDB89712 && ARCH_INTEGRATOR | 64 | bool "Support ARM720T processor" if ARCH_INTEGRATOR |
67 | default y if ARCH_CLPS711X || ARCH_L7200 || ARCH_CDB89712 || ARCH_H720X | ||
68 | select CPU_32v4T | 65 | select CPU_32v4T |
69 | select CPU_ABRT_LV4T | 66 | select CPU_ABRT_LV4T |
70 | select CPU_PABRT_NOIFAR | 67 | select CPU_PABRT_NOIFAR |
@@ -114,9 +111,7 @@ config CPU_ARM9TDMI | |||
114 | 111 | ||
115 | # ARM920T | 112 | # ARM920T |
116 | config CPU_ARM920T | 113 | config CPU_ARM920T |
117 | bool "Support ARM920T processor" | 114 | bool "Support ARM920T processor" if ARCH_INTEGRATOR |
118 | depends on ARCH_EP93XX || ARCH_INTEGRATOR || CPU_S3C2410 || CPU_S3C2440 || CPU_S3C2442 || ARCH_IMX || ARCH_AAEC2000 || ARCH_AT91RM9200 | ||
119 | default y if CPU_S3C2410 || CPU_S3C2440 || CPU_S3C2442 || ARCH_AT91RM9200 | ||
120 | select CPU_32v4T | 115 | select CPU_32v4T |
121 | select CPU_ABRT_EV4T | 116 | select CPU_ABRT_EV4T |
122 | select CPU_PABRT_NOIFAR | 117 | select CPU_PABRT_NOIFAR |
@@ -138,8 +133,6 @@ config CPU_ARM920T | |||
138 | # ARM922T | 133 | # ARM922T |
139 | config CPU_ARM922T | 134 | config CPU_ARM922T |
140 | bool "Support ARM922T processor" if ARCH_INTEGRATOR | 135 | bool "Support ARM922T processor" if ARCH_INTEGRATOR |
141 | depends on ARCH_LH7A40X || ARCH_INTEGRATOR || ARCH_KS8695 | ||
142 | default y if ARCH_LH7A40X || ARCH_KS8695 | ||
143 | select CPU_32v4T | 136 | select CPU_32v4T |
144 | select CPU_ABRT_EV4T | 137 | select CPU_ABRT_EV4T |
145 | select CPU_PABRT_NOIFAR | 138 | select CPU_PABRT_NOIFAR |
@@ -159,8 +152,6 @@ config CPU_ARM922T | |||
159 | # ARM925T | 152 | # ARM925T |
160 | config CPU_ARM925T | 153 | config CPU_ARM925T |
161 | bool "Support ARM925T processor" if ARCH_OMAP1 | 154 | bool "Support ARM925T processor" if ARCH_OMAP1 |
162 | depends on ARCH_OMAP15XX | ||
163 | default y if ARCH_OMAP15XX | ||
164 | select CPU_32v4T | 155 | select CPU_32v4T |
165 | select CPU_ABRT_EV4T | 156 | select CPU_ABRT_EV4T |
166 | select CPU_PABRT_NOIFAR | 157 | select CPU_PABRT_NOIFAR |
@@ -179,22 +170,7 @@ config CPU_ARM925T | |||
179 | 170 | ||
180 | # ARM926T | 171 | # ARM926T |
181 | config CPU_ARM926T | 172 | config CPU_ARM926T |
182 | bool "Support ARM926T processor" | 173 | bool "Support ARM926T processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB |
183 | depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || \ | ||
184 | MACH_VERSATILE_AB || ARCH_OMAP730 || \ | ||
185 | ARCH_OMAP16XX || MACH_REALVIEW_EB || \ | ||
186 | ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || \ | ||
187 | ARCH_AT91SAM9260 || ARCH_AT91SAM9261 || \ | ||
188 | ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || \ | ||
189 | ARCH_AT91SAM9G20 || ARCH_AT91CAP9 || \ | ||
190 | ARCH_NS9XXX || ARCH_DAVINCI || ARCH_MX2 | ||
191 | default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || \ | ||
192 | ARCH_OMAP730 || ARCH_OMAP16XX || \ | ||
193 | ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || \ | ||
194 | ARCH_AT91SAM9260 || ARCH_AT91SAM9261 || \ | ||
195 | ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || \ | ||
196 | ARCH_AT91SAM9G20 || ARCH_AT91CAP9 || \ | ||
197 | ARCH_NS9XXX || ARCH_DAVINCI || ARCH_MX2 | ||
198 | select CPU_32v5 | 174 | select CPU_32v5 |
199 | select CPU_ABRT_EV5TJ | 175 | select CPU_ABRT_EV5TJ |
200 | select CPU_PABRT_NOIFAR | 176 | select CPU_PABRT_NOIFAR |
@@ -247,8 +223,7 @@ config CPU_ARM946E | |||
247 | 223 | ||
248 | # ARM1020 - needs validating | 224 | # ARM1020 - needs validating |
249 | config CPU_ARM1020 | 225 | config CPU_ARM1020 |
250 | bool "Support ARM1020T (rev 0) processor" | 226 | bool "Support ARM1020T (rev 0) processor" if ARCH_INTEGRATOR |
251 | depends on ARCH_INTEGRATOR | ||
252 | select CPU_32v5 | 227 | select CPU_32v5 |
253 | select CPU_ABRT_EV4T | 228 | select CPU_ABRT_EV4T |
254 | select CPU_PABRT_NOIFAR | 229 | select CPU_PABRT_NOIFAR |
@@ -266,8 +241,7 @@ config CPU_ARM1020 | |||
266 | 241 | ||
267 | # ARM1020E - needs validating | 242 | # ARM1020E - needs validating |
268 | config CPU_ARM1020E | 243 | config CPU_ARM1020E |
269 | bool "Support ARM1020E processor" | 244 | bool "Support ARM1020E processor" if ARCH_INTEGRATOR |
270 | depends on ARCH_INTEGRATOR | ||
271 | select CPU_32v5 | 245 | select CPU_32v5 |
272 | select CPU_ABRT_EV4T | 246 | select CPU_ABRT_EV4T |
273 | select CPU_PABRT_NOIFAR | 247 | select CPU_PABRT_NOIFAR |
@@ -280,8 +254,7 @@ config CPU_ARM1020E | |||
280 | 254 | ||
281 | # ARM1022E | 255 | # ARM1022E |
282 | config CPU_ARM1022 | 256 | config CPU_ARM1022 |
283 | bool "Support ARM1022E processor" | 257 | bool "Support ARM1022E processor" if ARCH_INTEGRATOR |
284 | depends on ARCH_INTEGRATOR | ||
285 | select CPU_32v5 | 258 | select CPU_32v5 |
286 | select CPU_ABRT_EV4T | 259 | select CPU_ABRT_EV4T |
287 | select CPU_PABRT_NOIFAR | 260 | select CPU_PABRT_NOIFAR |
@@ -299,8 +272,7 @@ config CPU_ARM1022 | |||
299 | 272 | ||
300 | # ARM1026EJ-S | 273 | # ARM1026EJ-S |
301 | config CPU_ARM1026 | 274 | config CPU_ARM1026 |
302 | bool "Support ARM1026EJ-S processor" | 275 | bool "Support ARM1026EJ-S processor" if ARCH_INTEGRATOR |
303 | depends on ARCH_INTEGRATOR | ||
304 | select CPU_32v5 | 276 | select CPU_32v5 |
305 | select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10 | 277 | select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10 |
306 | select CPU_PABRT_NOIFAR | 278 | select CPU_PABRT_NOIFAR |
@@ -317,8 +289,7 @@ config CPU_ARM1026 | |||
317 | 289 | ||
318 | # SA110 | 290 | # SA110 |
319 | config CPU_SA110 | 291 | config CPU_SA110 |
320 | bool "Support StrongARM(R) SA-110 processor" if !ARCH_EBSA110 && !FOOTBRIDGE && !ARCH_TBOX && !ARCH_SHARK && !ARCH_NEXUSPCI && ARCH_RPC | 292 | bool "Support StrongARM(R) SA-110 processor" if ARCH_RPC |
321 | default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_TBOX || ARCH_SHARK || ARCH_NEXUSPCI | ||
322 | select CPU_32v3 if ARCH_RPC | 293 | select CPU_32v3 if ARCH_RPC |
323 | select CPU_32v4 if !ARCH_RPC | 294 | select CPU_32v4 if !ARCH_RPC |
324 | select CPU_ABRT_EV4 | 295 | select CPU_ABRT_EV4 |
@@ -340,8 +311,6 @@ config CPU_SA110 | |||
340 | # SA1100 | 311 | # SA1100 |
341 | config CPU_SA1100 | 312 | config CPU_SA1100 |
342 | bool | 313 | bool |
343 | depends on ARCH_SA1100 | ||
344 | default y | ||
345 | select CPU_32v4 | 314 | select CPU_32v4 |
346 | select CPU_ABRT_EV4 | 315 | select CPU_ABRT_EV4 |
347 | select CPU_PABRT_NOIFAR | 316 | select CPU_PABRT_NOIFAR |
@@ -353,8 +322,6 @@ config CPU_SA1100 | |||
353 | # XScale | 322 | # XScale |
354 | config CPU_XSCALE | 323 | config CPU_XSCALE |
355 | bool | 324 | bool |
356 | depends on ARCH_IOP32X || ARCH_IOP33X || PXA25x || PXA27x || ARCH_IXP4XX || ARCH_IXP2000 | ||
357 | default y | ||
358 | select CPU_32v5 | 325 | select CPU_32v5 |
359 | select CPU_ABRT_EV5T | 326 | select CPU_ABRT_EV5T |
360 | select CPU_PABRT_NOIFAR | 327 | select CPU_PABRT_NOIFAR |
@@ -365,8 +332,6 @@ config CPU_XSCALE | |||
365 | # XScale Core Version 3 | 332 | # XScale Core Version 3 |
366 | config CPU_XSC3 | 333 | config CPU_XSC3 |
367 | bool | 334 | bool |
368 | depends on ARCH_IXP23XX || ARCH_IOP13XX || PXA3xx | ||
369 | default y | ||
370 | select CPU_32v5 | 335 | select CPU_32v5 |
371 | select CPU_ABRT_EV5T | 336 | select CPU_ABRT_EV5T |
372 | select CPU_PABRT_NOIFAR | 337 | select CPU_PABRT_NOIFAR |
@@ -378,8 +343,6 @@ config CPU_XSC3 | |||
378 | # Feroceon | 343 | # Feroceon |
379 | config CPU_FEROCEON | 344 | config CPU_FEROCEON |
380 | bool | 345 | bool |
381 | depends on ARCH_ORION5X || ARCH_LOKI || ARCH_KIRKWOOD || ARCH_MV78XX0 | ||
382 | default y | ||
383 | select CPU_32v5 | 346 | select CPU_32v5 |
384 | select CPU_ABRT_EV5T | 347 | select CPU_ABRT_EV5T |
385 | select CPU_PABRT_NOIFAR | 348 | select CPU_PABRT_NOIFAR |
@@ -399,10 +362,7 @@ config CPU_FEROCEON_OLD_ID | |||
399 | 362 | ||
400 | # ARMv6 | 363 | # ARMv6 |
401 | config CPU_V6 | 364 | config CPU_V6 |
402 | bool "Support ARM V6 processor" | 365 | bool "Support ARM V6 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB |
403 | depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 || ARCH_MX3 || ARCH_MSM || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 | ||
404 | default y if ARCH_MX3 | ||
405 | default y if ARCH_MSM | ||
406 | select CPU_32v6 | 366 | select CPU_32v6 |
407 | select CPU_ABRT_EV6 | 367 | select CPU_ABRT_EV6 |
408 | select CPU_PABRT_NOIFAR | 368 | select CPU_PABRT_NOIFAR |
@@ -427,8 +387,7 @@ config CPU_32v6K | |||
427 | 387 | ||
428 | # ARMv7 | 388 | # ARMv7 |
429 | config CPU_V7 | 389 | config CPU_V7 |
430 | bool "Support ARM V7 processor" | 390 | bool "Support ARM V7 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB |
431 | depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP3 | ||
432 | select CPU_32v6K | 391 | select CPU_32v6K |
433 | select CPU_32v7 | 392 | select CPU_32v7 |
434 | select CPU_ABRT_EV7 | 393 | select CPU_ABRT_EV7 |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index d19c2bec2b1f..be93ff02a98d 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -26,6 +26,7 @@ | |||
26 | * - mm - mm_struct describing address space | 26 | * - mm - mm_struct describing address space |
27 | */ | 27 | */ |
28 | ENTRY(v7_flush_dcache_all) | 28 | ENTRY(v7_flush_dcache_all) |
29 | dmb @ ensure ordering with previous memory accesses | ||
29 | mrc p15, 1, r0, c0, c0, 1 @ read clidr | 30 | mrc p15, 1, r0, c0, c0, 1 @ read clidr |
30 | ands r3, r0, #0x7000000 @ extract loc from clidr | 31 | ands r3, r0, #0x7000000 @ extract loc from clidr |
31 | mov r3, r3, lsr #23 @ left align loc bit field | 32 | mov r3, r3, lsr #23 @ left align loc bit field |
@@ -64,6 +65,7 @@ skip: | |||
64 | finished: | 65 | finished: |
65 | mov r10, #0 @ swith back to cache level 0 | 66 | mov r10, #0 @ swith back to cache level 0 |
66 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr | 67 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr |
68 | dsb | ||
67 | isb | 69 | isb |
68 | mov pc, lr | 70 | mov pc, lr |
69 | ENDPROC(v7_flush_dcache_all) | 71 | ENDPROC(v7_flush_dcache_all) |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 636cf8fc70ef..c0b9a78d7b87 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -914,7 +914,7 @@ void __init paging_init(struct machine_desc *mdesc) | |||
914 | * allocate the zero page. Note that we count on this going ok. | 914 | * allocate the zero page. Note that we count on this going ok. |
915 | */ | 915 | */ |
916 | zero_page = alloc_bootmem_low_pages(PAGE_SIZE); | 916 | zero_page = alloc_bootmem_low_pages(PAGE_SIZE); |
917 | memzero(zero_page, PAGE_SIZE); | 917 | memset(zero_page, 0, PAGE_SIZE); |
918 | empty_zero_page = virt_to_page(zero_page); | 918 | empty_zero_page = virt_to_page(zero_page); |
919 | flush_dcache_page(empty_zero_page); | 919 | flush_dcache_page(empty_zero_page); |
920 | } | 920 | } |
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c index e0f19ab91163..2690146161ba 100644 --- a/arch/arm/mm/pgd.c +++ b/arch/arm/mm/pgd.c | |||
@@ -31,7 +31,7 @@ pgd_t *get_pgd_slow(struct mm_struct *mm) | |||
31 | if (!new_pgd) | 31 | if (!new_pgd) |
32 | goto no_pgd; | 32 | goto no_pgd; |
33 | 33 | ||
34 | memzero(new_pgd, FIRST_KERNEL_PGD_NR * sizeof(pgd_t)); | 34 | memset(new_pgd, 0, FIRST_KERNEL_PGD_NR * sizeof(pgd_t)); |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * Copy over the kernel and IO PGD entries | 37 | * Copy over the kernel and IO PGD entries |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 294943b85973..f0cc599facb7 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -71,6 +71,8 @@ ENTRY(cpu_v6_reset) | |||
71 | * IRQs are already disabled. | 71 | * IRQs are already disabled. |
72 | */ | 72 | */ |
73 | ENTRY(cpu_v6_do_idle) | 73 | ENTRY(cpu_v6_do_idle) |
74 | mov r1, #0 | ||
75 | mcr p15, 0, r1, c7, c10, 4 @ DWB - WFI may enter a low-power mode | ||
74 | mcr p15, 0, r1, c7, c0, 4 @ wait for interrupt | 76 | mcr p15, 0, r1, c7, c0, 4 @ wait for interrupt |
75 | mov pc, lr | 77 | mov pc, lr |
76 | 78 | ||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 4d3c0a73e7fb..d1ebec42521d 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -20,9 +20,17 @@ | |||
20 | 20 | ||
21 | #define TTB_C (1 << 0) | 21 | #define TTB_C (1 << 0) |
22 | #define TTB_S (1 << 1) | 22 | #define TTB_S (1 << 1) |
23 | #define TTB_RGN_NC (0 << 3) | ||
24 | #define TTB_RGN_OC_WBWA (1 << 3) | ||
23 | #define TTB_RGN_OC_WT (2 << 3) | 25 | #define TTB_RGN_OC_WT (2 << 3) |
24 | #define TTB_RGN_OC_WB (3 << 3) | 26 | #define TTB_RGN_OC_WB (3 << 3) |
25 | 27 | ||
28 | #ifndef CONFIG_SMP | ||
29 | #define TTB_FLAGS TTB_C|TTB_RGN_OC_WB @ mark PTWs cacheable, outer WB | ||
30 | #else | ||
31 | #define TTB_FLAGS TTB_C|TTB_S|TTB_RGN_OC_WBWA @ mark PTWs cacheable and shared, outer WBWA | ||
32 | #endif | ||
33 | |||
26 | ENTRY(cpu_v7_proc_init) | 34 | ENTRY(cpu_v7_proc_init) |
27 | mov pc, lr | 35 | mov pc, lr |
28 | ENDPROC(cpu_v7_proc_init) | 36 | ENDPROC(cpu_v7_proc_init) |
@@ -55,6 +63,7 @@ ENDPROC(cpu_v7_reset) | |||
55 | * IRQs are already disabled. | 63 | * IRQs are already disabled. |
56 | */ | 64 | */ |
57 | ENTRY(cpu_v7_do_idle) | 65 | ENTRY(cpu_v7_do_idle) |
66 | dsb @ WFI may enter a low-power mode | ||
58 | wfi | 67 | wfi |
59 | mov pc, lr | 68 | mov pc, lr |
60 | ENDPROC(cpu_v7_do_idle) | 69 | ENDPROC(cpu_v7_do_idle) |
@@ -85,7 +94,7 @@ ENTRY(cpu_v7_switch_mm) | |||
85 | #ifdef CONFIG_MMU | 94 | #ifdef CONFIG_MMU |
86 | mov r2, #0 | 95 | mov r2, #0 |
87 | ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id | 96 | ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id |
88 | orr r0, r0, #TTB_RGN_OC_WB @ mark PTWs outer cacheable, WB | 97 | orr r0, r0, #TTB_FLAGS |
89 | mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID | 98 | mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID |
90 | isb | 99 | isb |
91 | 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | 100 | 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 |
@@ -162,6 +171,11 @@ cpu_v7_name: | |||
162 | * - cache type register is implemented | 171 | * - cache type register is implemented |
163 | */ | 172 | */ |
164 | __v7_setup: | 173 | __v7_setup: |
174 | #ifdef CONFIG_SMP | ||
175 | mrc p15, 0, r0, c1, c0, 1 @ Enable SMP/nAMP mode | ||
176 | orr r0, r0, #(0x1 << 6) | ||
177 | mcr p15, 0, r0, c1, c0, 1 | ||
178 | #endif | ||
165 | adr r12, __v7_setup_stack @ the local stack | 179 | adr r12, __v7_setup_stack @ the local stack |
166 | stmia r12, {r0-r5, r7, r9, r11, lr} | 180 | stmia r12, {r0-r5, r7, r9, r11, lr} |
167 | bl v7_flush_dcache_all | 181 | bl v7_flush_dcache_all |
@@ -174,8 +188,7 @@ __v7_setup: | |||
174 | #ifdef CONFIG_MMU | 188 | #ifdef CONFIG_MMU |
175 | mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs | 189 | mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs |
176 | mcr p15, 0, r10, c2, c0, 2 @ TTB control register | 190 | mcr p15, 0, r10, c2, c0, 2 @ TTB control register |
177 | orr r4, r4, #TTB_RGN_OC_WB @ mark PTWs outer cacheable, WB | 191 | orr r4, r4, #TTB_FLAGS |
178 | mcr p15, 0, r4, c2, c0, 0 @ load TTB0 | ||
179 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 | 192 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 |
180 | mov r10, #0x1f @ domains 0, 1 = manager | 193 | mov r10, #0x1f @ domains 0, 1 = manager |
181 | mcr p15, 0, r10, c3, c0, 0 @ load domain access register | 194 | mcr p15, 0, r10, c3, c0, 0 @ load domain access register |
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index b2a7e3fad117..a1612958a59e 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig | |||
@@ -8,11 +8,13 @@ choice | |||
8 | 8 | ||
9 | config ARCH_MX2 | 9 | config ARCH_MX2 |
10 | bool "MX2-based" | 10 | bool "MX2-based" |
11 | select CPU_ARM926T | ||
11 | help | 12 | help |
12 | This enables support for systems based on the Freescale i.MX2 family | 13 | This enables support for systems based on the Freescale i.MX2 family |
13 | 14 | ||
14 | config ARCH_MX3 | 15 | config ARCH_MX3 |
15 | bool "MX3-based" | 16 | bool "MX3-based" |
17 | select CPU_V6 | ||
16 | help | 18 | help |
17 | This enables support for systems based on the Freescale i.MX3 family | 19 | This enables support for systems based on the Freescale i.MX3 family |
18 | 20 | ||
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index a94f0c44ebc8..46d3b0b9ce69 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -14,9 +14,11 @@ config ARCH_OMAP1 | |||
14 | 14 | ||
15 | config ARCH_OMAP2 | 15 | config ARCH_OMAP2 |
16 | bool "TI OMAP2" | 16 | bool "TI OMAP2" |
17 | select CPU_V6 | ||
17 | 18 | ||
18 | config ARCH_OMAP3 | 19 | config ARCH_OMAP3 |
19 | bool "TI OMAP3" | 20 | bool "TI OMAP3" |
21 | select CPU_V7 | ||
20 | 22 | ||
21 | endchoice | 23 | endchoice |
22 | 24 | ||
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index a62dcf7098ba..3c73aafe3e01 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S | |||
@@ -101,9 +101,12 @@ ENTRY(vfp_support_entry) | |||
101 | VFPFSTMIA r4, r5 @ save the working registers | 101 | VFPFSTMIA r4, r5 @ save the working registers |
102 | VFPFMRX r5, FPSCR @ current status | 102 | VFPFMRX r5, FPSCR @ current status |
103 | tst r1, #FPEXC_EX @ is there additional state to save? | 103 | tst r1, #FPEXC_EX @ is there additional state to save? |
104 | VFPFMRX r6, FPINST, NE @ FPINST (only if FPEXC.EX is set) | 104 | beq 1f |
105 | tstne r1, #FPEXC_FP2V @ is there an FPINST2 to read? | 105 | VFPFMRX r6, FPINST @ FPINST (only if FPEXC.EX is set) |
106 | VFPFMRX r8, FPINST2, NE @ FPINST2 if needed (and present) | 106 | tst r1, #FPEXC_FP2V @ is there an FPINST2 to read? |
107 | beq 1f | ||
108 | VFPFMRX r8, FPINST2 @ FPINST2 if needed (and present) | ||
109 | 1: | ||
107 | stmia r4, {r1, r5, r6, r8} @ save FPEXC, FPSCR, FPINST, FPINST2 | 110 | stmia r4, {r1, r5, r6, r8} @ save FPEXC, FPSCR, FPINST, FPINST2 |
108 | @ and point r4 at the word at the | 111 | @ and point r4 at the word at the |
109 | @ start of the register dump | 112 | @ start of the register dump |
@@ -117,9 +120,12 @@ no_old_VFP_process: | |||
117 | @ FPEXC is in a safe state | 120 | @ FPEXC is in a safe state |
118 | ldmia r10, {r1, r5, r6, r8} @ load FPEXC, FPSCR, FPINST, FPINST2 | 121 | ldmia r10, {r1, r5, r6, r8} @ load FPEXC, FPSCR, FPINST, FPINST2 |
119 | tst r1, #FPEXC_EX @ is there additional state to restore? | 122 | tst r1, #FPEXC_EX @ is there additional state to restore? |
120 | VFPFMXR FPINST, r6, NE @ restore FPINST (only if FPEXC.EX is set) | 123 | beq 1f |
121 | tstne r1, #FPEXC_FP2V @ is there an FPINST2 to write? | 124 | VFPFMXR FPINST, r6 @ restore FPINST (only if FPEXC.EX is set) |
122 | VFPFMXR FPINST2, r8, NE @ FPINST2 if needed (and present) | 125 | tst r1, #FPEXC_FP2V @ is there an FPINST2 to write? |
126 | beq 1f | ||
127 | VFPFMXR FPINST2, r8 @ FPINST2 if needed (and present) | ||
128 | 1: | ||
123 | VFPFMXR FPSCR, r5 @ restore status | 129 | VFPFMXR FPSCR, r5 @ restore status |
124 | 130 | ||
125 | check_for_exception: | 131 | check_for_exception: |
@@ -175,9 +181,12 @@ ENTRY(vfp_save_state) | |||
175 | VFPFSTMIA r0, r2 @ save the working registers | 181 | VFPFSTMIA r0, r2 @ save the working registers |
176 | VFPFMRX r2, FPSCR @ current status | 182 | VFPFMRX r2, FPSCR @ current status |
177 | tst r1, #FPEXC_EX @ is there additional state to save? | 183 | tst r1, #FPEXC_EX @ is there additional state to save? |
178 | VFPFMRX r3, FPINST, NE @ FPINST (only if FPEXC.EX is set) | 184 | beq 1f |
179 | tstne r1, #FPEXC_FP2V @ is there an FPINST2 to read? | 185 | VFPFMRX r3, FPINST @ FPINST (only if FPEXC.EX is set) |
180 | VFPFMRX r12, FPINST2, NE @ FPINST2 if needed (and present) | 186 | tst r1, #FPEXC_FP2V @ is there an FPINST2 to read? |
187 | beq 1f | ||
188 | VFPFMRX r12, FPINST2 @ FPINST2 if needed (and present) | ||
189 | 1: | ||
181 | stmia r0, {r1, r2, r3, r12} @ save FPEXC, FPSCR, FPINST, FPINST2 | 190 | stmia r0, {r1, r2, r3, r12} @ save FPEXC, FPSCR, FPINST, FPINST2 |
182 | mov pc, lr | 191 | mov pc, lr |
183 | ENDPROC(vfp_save_state) | 192 | ENDPROC(vfp_save_state) |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index c0d2c9bb952b..67ca340a7c85 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -371,6 +371,15 @@ static int __init vfp_init(void) | |||
371 | * in place; report VFP support to userspace. | 371 | * in place; report VFP support to userspace. |
372 | */ | 372 | */ |
373 | elf_hwcap |= HWCAP_VFP; | 373 | elf_hwcap |= HWCAP_VFP; |
374 | #ifdef CONFIG_NEON | ||
375 | /* | ||
376 | * Check for the presence of the Advanced SIMD | ||
377 | * load/store instructions, integer and single | ||
378 | * precision floating point operations. | ||
379 | */ | ||
380 | if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100) | ||
381 | elf_hwcap |= HWCAP_NEON; | ||
382 | #endif | ||
374 | } | 383 | } |
375 | return 0; | 384 | return 0; |
376 | } | 385 | } |
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 906f9b9d715d..587f5b2380d4 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c | |||
@@ -1016,7 +1016,7 @@ static int i2c_pxa_probe(struct platform_device *dev) | |||
1016 | snprintf(i2c->adap.name, sizeof(i2c->adap.name), "pxa_i2c-i2c.%u", | 1016 | snprintf(i2c->adap.name, sizeof(i2c->adap.name), "pxa_i2c-i2c.%u", |
1017 | i2c->adap.nr); | 1017 | i2c->adap.nr); |
1018 | 1018 | ||
1019 | i2c->clk = clk_get(&dev->dev, "I2CCLK"); | 1019 | i2c->clk = clk_get(&dev->dev, NULL); |
1020 | if (IS_ERR(i2c->clk)) { | 1020 | if (IS_ERR(i2c->clk)) { |
1021 | ret = PTR_ERR(i2c->clk); | 1021 | ret = PTR_ERR(i2c->clk); |
1022 | goto eclk; | 1022 | goto eclk; |
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 6d7401772a8f..57630402ea67 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -732,7 +732,7 @@ config BLK_DEV_IDE_TX4939 | |||
732 | 732 | ||
733 | config IDE_ARM | 733 | config IDE_ARM |
734 | tristate "ARM IDE support" | 734 | tristate "ARM IDE support" |
735 | depends on ARM && (ARCH_CLPS7500 || ARCH_RPC || ARCH_SHARK) | 735 | depends on ARM && (ARCH_RPC || ARCH_SHARK) |
736 | default y | 736 | default y |
737 | 737 | ||
738 | config BLK_DEV_IDE_ICSIDE | 738 | config BLK_DEV_IDE_ICSIDE |
diff --git a/drivers/ide/ide_arm.c b/drivers/ide/ide_arm.c index f728f2927b5a..bdcac94d7c1f 100644 --- a/drivers/ide/ide_arm.c +++ b/drivers/ide/ide_arm.c | |||
@@ -15,15 +15,8 @@ | |||
15 | 15 | ||
16 | #define DRV_NAME "ide_arm" | 16 | #define DRV_NAME "ide_arm" |
17 | 17 | ||
18 | #ifdef CONFIG_ARCH_CLPS7500 | 18 | #define IDE_ARM_IO 0x1f0 |
19 | # include <mach/hardware.h> | 19 | #define IDE_ARM_IRQ IRQ_HARDDISK |
20 | # | ||
21 | # define IDE_ARM_IO (ISASLOT_IO + 0x1f0) | ||
22 | # define IDE_ARM_IRQ IRQ_ISA_14 | ||
23 | #else | ||
24 | # define IDE_ARM_IO 0x1f0 | ||
25 | # define IDE_ARM_IRQ IRQ_HARDDISK | ||
26 | #endif | ||
27 | 20 | ||
28 | static int __init ide_arm_init(void) | 21 | static int __init ide_arm_init(void) |
29 | { | 22 | { |
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index 6d30c6d334c3..0d2fc64a5e1c 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c | |||
@@ -475,7 +475,7 @@ static int __devinit pxa27x_keypad_probe(struct platform_device *pdev) | |||
475 | goto failed_free_mem; | 475 | goto failed_free_mem; |
476 | } | 476 | } |
477 | 477 | ||
478 | keypad->clk = clk_get(&pdev->dev, "KBDCLK"); | 478 | keypad->clk = clk_get(&pdev->dev, NULL); |
479 | if (IS_ERR(keypad->clk)) { | 479 | if (IS_ERR(keypad->clk)) { |
480 | dev_err(&pdev->dev, "failed to get keypad clock\n"); | 480 | dev_err(&pdev->dev, "failed to get keypad clock\n"); |
481 | error = PTR_ERR(keypad->clk); | 481 | error = PTR_ERR(keypad->clk); |
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig index 27d70d326ff3..da3c3a5d2689 100644 --- a/drivers/input/serio/Kconfig +++ b/drivers/input/serio/Kconfig | |||
@@ -79,7 +79,7 @@ config SERIO_PARKBD | |||
79 | 79 | ||
80 | config SERIO_RPCKBD | 80 | config SERIO_RPCKBD |
81 | tristate "Acorn RiscPC keyboard controller" | 81 | tristate "Acorn RiscPC keyboard controller" |
82 | depends on ARCH_ACORN || ARCH_CLPS7500 | 82 | depends on ARCH_ACORN |
83 | default y | 83 | default y |
84 | help | 84 | help |
85 | Say Y here if you have the Acorn RiscPC and want to use an AT | 85 | Say Y here if you have the Acorn RiscPC and want to use an AT |
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index eb6be5802928..6586f0b13363 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -1071,7 +1071,7 @@ static int pxa_camera_probe(struct platform_device *pdev) | |||
1071 | goto exit; | 1071 | goto exit; |
1072 | } | 1072 | } |
1073 | 1073 | ||
1074 | pcdev->clk = clk_get(&pdev->dev, "CAMCLK"); | 1074 | pcdev->clk = clk_get(&pdev->dev, NULL); |
1075 | if (IS_ERR(pcdev->clk)) { | 1075 | if (IS_ERR(pcdev->clk)) { |
1076 | err = PTR_ERR(pcdev->clk); | 1076 | err = PTR_ERR(pcdev->clk); |
1077 | goto exit_kfree; | 1077 | goto exit_kfree; |
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index e4c0db4dc7b1..9e485459f63b 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c | |||
@@ -474,9 +474,9 @@ static __init int asic3_gpio_probe(struct platform_device *pdev, | |||
474 | u16 dir_reg[ASIC3_NUM_GPIO_BANKS]; | 474 | u16 dir_reg[ASIC3_NUM_GPIO_BANKS]; |
475 | int i; | 475 | int i; |
476 | 476 | ||
477 | memzero(alt_reg, ASIC3_NUM_GPIO_BANKS * sizeof(u16)); | 477 | memset(alt_reg, 0, ASIC3_NUM_GPIO_BANKS * sizeof(u16)); |
478 | memzero(out_reg, ASIC3_NUM_GPIO_BANKS * sizeof(u16)); | 478 | memset(out_reg, 0, ASIC3_NUM_GPIO_BANKS * sizeof(u16)); |
479 | memzero(dir_reg, ASIC3_NUM_GPIO_BANKS * sizeof(u16)); | 479 | memset(dir_reg, 0, ASIC3_NUM_GPIO_BANKS * sizeof(u16)); |
480 | 480 | ||
481 | /* Enable all GPIOs */ | 481 | /* Enable all GPIOs */ |
482 | asic3_write_register(asic, ASIC3_GPIO_OFFSET(A, MASK), 0xffff); | 482 | asic3_write_register(asic, ASIC3_GPIO_OFFSET(A, MASK), 0xffff); |
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index ebfaa9960939..a1700a80e2fd 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c | |||
@@ -533,7 +533,7 @@ static int pxamci_probe(struct platform_device *pdev) | |||
533 | host->pdata = pdev->dev.platform_data; | 533 | host->pdata = pdev->dev.platform_data; |
534 | host->clkrt = CLKRT_OFF; | 534 | host->clkrt = CLKRT_OFF; |
535 | 535 | ||
536 | host->clk = clk_get(&pdev->dev, "MMCCLK"); | 536 | host->clk = clk_get(&pdev->dev, NULL); |
537 | if (IS_ERR(host->clk)) { | 537 | if (IS_ERR(host->clk)) { |
538 | ret = PTR_ERR(host->clk); | 538 | ret = PTR_ERR(host->clk); |
539 | host->clk = NULL; | 539 | host->clk = NULL; |
diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c index dcdb1f17577d..3ea1de9be720 100644 --- a/drivers/mtd/maps/ixp2000.c +++ b/drivers/mtd/maps/ixp2000.c | |||
@@ -170,7 +170,7 @@ static int ixp2000_flash_probe(struct platform_device *dev) | |||
170 | err = -ENOMEM; | 170 | err = -ENOMEM; |
171 | goto Error; | 171 | goto Error; |
172 | } | 172 | } |
173 | memzero(info, sizeof(struct ixp2000_flash_info)); | 173 | memset(info, 0, sizeof(struct ixp2000_flash_info)); |
174 | 174 | ||
175 | platform_set_drvdata(dev, info); | 175 | platform_set_drvdata(dev, info); |
176 | 176 | ||
diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c index 9c7a5fbd4e51..16555cbeaea4 100644 --- a/drivers/mtd/maps/ixp4xx.c +++ b/drivers/mtd/maps/ixp4xx.c | |||
@@ -201,7 +201,7 @@ static int ixp4xx_flash_probe(struct platform_device *dev) | |||
201 | err = -ENOMEM; | 201 | err = -ENOMEM; |
202 | goto Error; | 202 | goto Error; |
203 | } | 203 | } |
204 | memzero(info, sizeof(struct ixp4xx_flash_info)); | 204 | memset(info, 0, sizeof(struct ixp4xx_flash_info)); |
205 | 205 | ||
206 | platform_set_drvdata(dev, info); | 206 | platform_set_drvdata(dev, info); |
207 | 207 | ||
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index c0fa9c9edf08..61c922a8356f 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
@@ -1079,7 +1079,7 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) | |||
1079 | this = &info->nand_chip; | 1079 | this = &info->nand_chip; |
1080 | mtd->priv = info; | 1080 | mtd->priv = info; |
1081 | 1081 | ||
1082 | info->clk = clk_get(&pdev->dev, "NANDCLK"); | 1082 | info->clk = clk_get(&pdev->dev, NULL); |
1083 | if (IS_ERR(info->clk)) { | 1083 | if (IS_ERR(info->clk)) { |
1084 | dev_err(&pdev->dev, "failed to get nand clock\n"); | 1084 | dev_err(&pdev->dev, "failed to get nand clock\n"); |
1085 | ret = PTR_ERR(info->clk); | 1085 | ret = PTR_ERR(info->clk); |
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index 556139ed1fdf..bc9aa64bf187 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c | |||
@@ -818,7 +818,7 @@ static int s3c24xx_nand_probe(struct platform_device *pdev, | |||
818 | goto exit_error; | 818 | goto exit_error; |
819 | } | 819 | } |
820 | 820 | ||
821 | memzero(info, sizeof(*info)); | 821 | memset(info, 0, sizeof(*info)); |
822 | platform_set_drvdata(pdev, info); | 822 | platform_set_drvdata(pdev, info); |
823 | 823 | ||
824 | spin_lock_init(&info->controller.lock); | 824 | spin_lock_init(&info->controller.lock); |
@@ -883,7 +883,7 @@ static int s3c24xx_nand_probe(struct platform_device *pdev, | |||
883 | goto exit_error; | 883 | goto exit_error; |
884 | } | 884 | } |
885 | 885 | ||
886 | memzero(info->mtds, size); | 886 | memset(info->mtds, 0, size); |
887 | 887 | ||
888 | /* initialise all possible chips */ | 888 | /* initialise all possible chips */ |
889 | 889 | ||
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 7107620f615d..0b729f7d91fc 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -170,11 +170,7 @@ static char version[] __initdata = | |||
170 | /* The cs8900 has 4 IRQ pins, software selectable. cs8900_irq_map maps | 170 | /* The cs8900 has 4 IRQ pins, software selectable. cs8900_irq_map maps |
171 | them to system IRQ numbers. This mapping is card specific and is set to | 171 | them to system IRQ numbers. This mapping is card specific and is set to |
172 | the configuration of the Cirrus Eval board for this chip. */ | 172 | the configuration of the Cirrus Eval board for this chip. */ |
173 | #ifdef CONFIG_ARCH_CLPS7500 | 173 | #if defined(CONFIG_SH_HICOSH4) |
174 | static unsigned int netcard_portlist[] __used __initdata = | ||
175 | { 0x80090303, 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0}; | ||
176 | static unsigned int cs8900_irq_map[] = {12,0,0,0}; | ||
177 | #elif defined(CONFIG_SH_HICOSH4) | ||
178 | static unsigned int netcard_portlist[] __used __initdata = | 174 | static unsigned int netcard_portlist[] __used __initdata = |
179 | { 0x0300, 0}; | 175 | { 0x0300, 0}; |
180 | static unsigned int cs8900_irq_map[] = {1,0,0,0}; | 176 | static unsigned int cs8900_irq_map[] = {1,0,0,0}; |
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index abc00be55433..8ea314bc00c1 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -766,7 +766,7 @@ static int serial_pxa_probe(struct platform_device *dev) | |||
766 | if (!sport) | 766 | if (!sport) |
767 | return -ENOMEM; | 767 | return -ENOMEM; |
768 | 768 | ||
769 | sport->clk = clk_get(&dev->dev, "UARTCLK"); | 769 | sport->clk = clk_get(&dev->dev, NULL); |
770 | if (IS_ERR(sport->clk)) { | 770 | if (IS_ERR(sport->clk)) { |
771 | ret = PTR_ERR(sport->clk); | 771 | ret = PTR_ERR(sport->clk); |
772 | goto err_free; | 772 | goto err_free; |
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index 2dbc0db0b46c..8c5026be79d4 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c | |||
@@ -2145,7 +2145,7 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev) | |||
2145 | if (irq < 0) | 2145 | if (irq < 0) |
2146 | return -ENODEV; | 2146 | return -ENODEV; |
2147 | 2147 | ||
2148 | dev->clk = clk_get(&pdev->dev, "UDCCLK"); | 2148 | dev->clk = clk_get(&pdev->dev, NULL); |
2149 | if (IS_ERR(dev->clk)) { | 2149 | if (IS_ERR(dev->clk)) { |
2150 | retval = PTR_ERR(dev->clk); | 2150 | retval = PTR_ERR(dev->clk); |
2151 | goto err_clk; | 2151 | goto err_clk; |
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index caa37c95802c..944e4ff641df 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c | |||
@@ -2226,7 +2226,7 @@ static int __init pxa_udc_probe(struct platform_device *pdev) | |||
2226 | udc->dev = &pdev->dev; | 2226 | udc->dev = &pdev->dev; |
2227 | udc->mach = pdev->dev.platform_data; | 2227 | udc->mach = pdev->dev.platform_data; |
2228 | 2228 | ||
2229 | udc->clk = clk_get(&pdev->dev, "UDCCLK"); | 2229 | udc->clk = clk_get(&pdev->dev, NULL); |
2230 | if (IS_ERR(udc->clk)) { | 2230 | if (IS_ERR(udc->clk)) { |
2231 | retval = PTR_ERR(udc->clk); | 2231 | retval = PTR_ERR(udc->clk); |
2232 | goto err_clk; | 2232 | goto err_clk; |
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index e294d430733b..e44dc2cbca24 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c | |||
@@ -296,7 +296,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device | |||
296 | return -ENXIO; | 296 | return -ENXIO; |
297 | } | 297 | } |
298 | 298 | ||
299 | usb_clk = clk_get(&pdev->dev, "USBCLK"); | 299 | usb_clk = clk_get(&pdev->dev, NULL); |
300 | if (IS_ERR(usb_clk)) | 300 | if (IS_ERR(usb_clk)) |
301 | return PTR_ERR(usb_clk); | 301 | return PTR_ERR(usb_clk); |
302 | 302 | ||
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 3f3ce13fef43..237301849075 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -362,7 +362,7 @@ endchoice | |||
362 | 362 | ||
363 | config FB_ACORN | 363 | config FB_ACORN |
364 | bool "Acorn VIDC support" | 364 | bool "Acorn VIDC support" |
365 | depends on (FB = y) && ARM && (ARCH_ACORN || ARCH_CLPS7500) | 365 | depends on (FB = y) && ARM && ARCH_ACORN |
366 | select FB_CFB_FILLRECT | 366 | select FB_CFB_FILLRECT |
367 | select FB_CFB_COPYAREA | 367 | select FB_CFB_COPYAREA |
368 | select FB_CFB_IMAGEBLIT | 368 | select FB_CFB_IMAGEBLIT |
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index cc59c52e1103..0bc2c5a127b9 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -1429,7 +1429,7 @@ static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) | |||
1429 | memset(fbi, 0, sizeof(struct pxafb_info)); | 1429 | memset(fbi, 0, sizeof(struct pxafb_info)); |
1430 | fbi->dev = dev; | 1430 | fbi->dev = dev; |
1431 | 1431 | ||
1432 | fbi->clk = clk_get(dev, "LCDCLK"); | 1432 | fbi->clk = clk_get(dev, NULL); |
1433 | if (IS_ERR(fbi->clk)) { | 1433 | if (IS_ERR(fbi->clk)) { |
1434 | kfree(fbi); | 1434 | kfree(fbi); |
1435 | return NULL; | 1435 | return NULL; |
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index c052bd4c0b06..076f946fa0f5 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c | |||
@@ -114,7 +114,7 @@ | |||
114 | * - convert dma address types to dma_addr_t | 114 | * - convert dma address types to dma_addr_t |
115 | * - remove unused 'montype' stuff | 115 | * - remove unused 'montype' stuff |
116 | * - remove redundant zero inits of init_var after the initial | 116 | * - remove redundant zero inits of init_var after the initial |
117 | * memzero. | 117 | * memset. |
118 | * - remove allow_modeset (acornfb idea does not belong here) | 118 | * - remove allow_modeset (acornfb idea does not belong here) |
119 | * | 119 | * |
120 | * 2001/05/28: <rmk@arm.linux.org.uk> | 120 | * 2001/05/28: <rmk@arm.linux.org.uk> |