diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-27 06:30:31 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-27 06:30:31 -0400 |
commit | b0df89868006517417251e02cc4ce5d4b0165885 (patch) | |
tree | 6800388c633a13f64fd1f7845ce026ca2606522f /arch/arm/mach-integrator | |
parent | 4ba21e868f4b6e2ce5432055e206edadc6319533 (diff) | |
parent | 6c634726352f0d796a4b5e6aa9849ee5b45712ce (diff) |
Merge branch 'devel-stable' into for-linus
Conflicts:
arch/arm/Kconfig.debug
arch/arm/plat-versatile/Kconfig
Merge fixes:
arch/arm/mach-integrator/Kconfig
drivers/clocksource/Kconfig
Diffstat (limited to 'arch/arm/mach-integrator')
-rw-r--r-- | arch/arm/mach-integrator/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-integrator/core.c | 70 | ||||
-rw-r--r-- | arch/arm/mach-integrator/impd1.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-integrator/include/mach/system.h | 33 | ||||
-rw-r--r-- | arch/arm/mach-integrator/integrator_cp.c | 49 |
5 files changed, 25 insertions, 137 deletions
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig index 5a6148ab6dac..350e26636a06 100644 --- a/arch/arm/mach-integrator/Kconfig +++ b/arch/arm/mach-integrator/Kconfig | |||
@@ -5,7 +5,6 @@ menu "Integrator Options" | |||
5 | config ARCH_INTEGRATOR_AP | 5 | config ARCH_INTEGRATOR_AP |
6 | bool "Support Integrator/AP and Integrator/PP2 platforms" | 6 | bool "Support Integrator/AP and Integrator/PP2 platforms" |
7 | select CLKSRC_MMIO | 7 | select CLKSRC_MMIO |
8 | select HAVE_SCHED_CLOCK | ||
9 | select MIGHT_HAVE_PCI | 8 | select MIGHT_HAVE_PCI |
10 | select SERIAL_AMBA_PL010 | 9 | select SERIAL_AMBA_PL010 |
11 | select SERIAL_AMBA_PL010_CONSOLE | 10 | select SERIAL_AMBA_PL010_CONSOLE |
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index cba1907c2e1c..304dfb2b346a 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -36,67 +36,23 @@ | |||
36 | 36 | ||
37 | static struct amba_pl010_data integrator_uart_data; | 37 | static struct amba_pl010_data integrator_uart_data; |
38 | 38 | ||
39 | static struct amba_device rtc_device = { | 39 | #define INTEGRATOR_RTC_IRQ { IRQ_RTCINT } |
40 | .dev = { | 40 | #define INTEGRATOR_UART0_IRQ { IRQ_UARTINT0 } |
41 | .init_name = "mb:15", | 41 | #define INTEGRATOR_UART1_IRQ { IRQ_UARTINT1 } |
42 | }, | 42 | #define KMI0_IRQ { IRQ_KMIINT0 } |
43 | .res = { | 43 | #define KMI1_IRQ { IRQ_KMIINT1 } |
44 | .start = INTEGRATOR_RTC_BASE, | ||
45 | .end = INTEGRATOR_RTC_BASE + SZ_4K - 1, | ||
46 | .flags = IORESOURCE_MEM, | ||
47 | }, | ||
48 | .irq = { IRQ_RTCINT, NO_IRQ }, | ||
49 | }; | ||
50 | 44 | ||
51 | static struct amba_device uart0_device = { | 45 | static AMBA_APB_DEVICE(rtc, "mb:15", 0, |
52 | .dev = { | 46 | INTEGRATOR_RTC_BASE, INTEGRATOR_RTC_IRQ, NULL); |
53 | .init_name = "mb:16", | ||
54 | .platform_data = &integrator_uart_data, | ||
55 | }, | ||
56 | .res = { | ||
57 | .start = INTEGRATOR_UART0_BASE, | ||
58 | .end = INTEGRATOR_UART0_BASE + SZ_4K - 1, | ||
59 | .flags = IORESOURCE_MEM, | ||
60 | }, | ||
61 | .irq = { IRQ_UARTINT0, NO_IRQ }, | ||
62 | }; | ||
63 | 47 | ||
64 | static struct amba_device uart1_device = { | 48 | static AMBA_APB_DEVICE(uart0, "mb:16", 0, |
65 | .dev = { | 49 | INTEGRATOR_UART0_BASE, INTEGRATOR_UART0_IRQ, &integrator_uart_data); |
66 | .init_name = "mb:17", | ||
67 | .platform_data = &integrator_uart_data, | ||
68 | }, | ||
69 | .res = { | ||
70 | .start = INTEGRATOR_UART1_BASE, | ||
71 | .end = INTEGRATOR_UART1_BASE + SZ_4K - 1, | ||
72 | .flags = IORESOURCE_MEM, | ||
73 | }, | ||
74 | .irq = { IRQ_UARTINT1, NO_IRQ }, | ||
75 | }; | ||
76 | 50 | ||
77 | static struct amba_device kmi0_device = { | 51 | static AMBA_APB_DEVICE(uart1, "mb:17", 0, |
78 | .dev = { | 52 | INTEGRATOR_UART1_BASE, INTEGRATOR_UART1_IRQ, &integrator_uart_data); |
79 | .init_name = "mb:18", | ||
80 | }, | ||
81 | .res = { | ||
82 | .start = KMI0_BASE, | ||
83 | .end = KMI0_BASE + SZ_4K - 1, | ||
84 | .flags = IORESOURCE_MEM, | ||
85 | }, | ||
86 | .irq = { IRQ_KMIINT0, NO_IRQ }, | ||
87 | }; | ||
88 | 53 | ||
89 | static struct amba_device kmi1_device = { | 54 | static AMBA_APB_DEVICE(kmi0, "mb:18", 0, KMI0_BASE, KMI0_IRQ, NULL); |
90 | .dev = { | 55 | static AMBA_APB_DEVICE(kmi1, "mb:19", 0, KMI1_BASE, KMI1_IRQ, NULL); |
91 | .init_name = "mb:19", | ||
92 | }, | ||
93 | .res = { | ||
94 | .start = KMI1_BASE, | ||
95 | .end = KMI1_BASE + SZ_4K - 1, | ||
96 | .flags = IORESOURCE_MEM, | ||
97 | }, | ||
98 | .irq = { IRQ_KMIINT1, NO_IRQ }, | ||
99 | }; | ||
100 | 56 | ||
101 | static struct amba_device *amba_devs[] __initdata = { | 57 | static struct amba_device *amba_devs[] __initdata = { |
102 | &rtc_device, | 58 | &rtc_device, |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 8cbb75a96bd4..3e538da6cb1f 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -401,24 +401,21 @@ static int impd1_probe(struct lm_device *dev) | |||
401 | 401 | ||
402 | pc_base = dev->resource.start + idev->offset; | 402 | pc_base = dev->resource.start + idev->offset; |
403 | 403 | ||
404 | d = kzalloc(sizeof(struct amba_device), GFP_KERNEL); | 404 | d = amba_device_alloc(NULL, pc_base, SZ_4K); |
405 | if (!d) | 405 | if (!d) |
406 | continue; | 406 | continue; |
407 | 407 | ||
408 | dev_set_name(&d->dev, "lm%x:%5.5lx", dev->id, idev->offset >> 12); | 408 | dev_set_name(&d->dev, "lm%x:%5.5lx", dev->id, idev->offset >> 12); |
409 | d->dev.parent = &dev->dev; | 409 | d->dev.parent = &dev->dev; |
410 | d->res.start = dev->resource.start + idev->offset; | ||
411 | d->res.end = d->res.start + SZ_4K - 1; | ||
412 | d->res.flags = IORESOURCE_MEM; | ||
413 | d->irq[0] = dev->irq; | 410 | d->irq[0] = dev->irq; |
414 | d->irq[1] = dev->irq; | 411 | d->irq[1] = dev->irq; |
415 | d->periphid = idev->id; | 412 | d->periphid = idev->id; |
416 | d->dev.platform_data = idev->platform_data; | 413 | d->dev.platform_data = idev->platform_data; |
417 | 414 | ||
418 | ret = amba_device_register(d, &dev->resource); | 415 | ret = amba_device_add(d, &dev->resource); |
419 | if (ret) { | 416 | if (ret) { |
420 | dev_err(&d->dev, "unable to register device: %d\n", ret); | 417 | dev_err(&d->dev, "unable to register device: %d\n", ret); |
421 | kfree(d); | 418 | amba_device_put(d); |
422 | } | 419 | } |
423 | } | 420 | } |
424 | 421 | ||
diff --git a/arch/arm/mach-integrator/include/mach/system.h b/arch/arm/mach-integrator/include/mach/system.h deleted file mode 100644 index 901514eba4a6..000000000000 --- a/arch/arm/mach-integrator/include/mach/system.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-integrator/include/mach/system.h | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
5 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #ifndef __ASM_ARCH_SYSTEM_H | ||
22 | #define __ASM_ARCH_SYSTEM_H | ||
23 | |||
24 | static inline void arch_idle(void) | ||
25 | { | ||
26 | /* | ||
27 | * This should do all the clock switching | ||
28 | * and wait for interrupt tricks | ||
29 | */ | ||
30 | cpu_do_idle(); | ||
31 | } | ||
32 | |||
33 | #endif | ||
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 38d997dc96f8..48a115a91d9d 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -347,32 +347,14 @@ static struct mmci_platform_data mmc_data = { | |||
347 | .gpio_cd = -1, | 347 | .gpio_cd = -1, |
348 | }; | 348 | }; |
349 | 349 | ||
350 | static struct amba_device mmc_device = { | 350 | #define INTEGRATOR_CP_MMC_IRQS { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 } |
351 | .dev = { | 351 | #define INTEGRATOR_CP_AACI_IRQS { IRQ_CP_AACIINT } |
352 | .init_name = "mb:1c", | ||
353 | .platform_data = &mmc_data, | ||
354 | }, | ||
355 | .res = { | ||
356 | .start = INTEGRATOR_CP_MMC_BASE, | ||
357 | .end = INTEGRATOR_CP_MMC_BASE + SZ_4K - 1, | ||
358 | .flags = IORESOURCE_MEM, | ||
359 | }, | ||
360 | .irq = { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 }, | ||
361 | .periphid = 0, | ||
362 | }; | ||
363 | 352 | ||
364 | static struct amba_device aaci_device = { | 353 | static AMBA_APB_DEVICE(mmc, "mb:1c", 0, INTEGRATOR_CP_MMC_BASE, |
365 | .dev = { | 354 | INTEGRATOR_CP_MMC_IRQS, &mmc_data); |
366 | .init_name = "mb:1d", | 355 | |
367 | }, | 356 | static AMBA_APB_DEVICE(aaci, "mb:1d", 0, INTEGRATOR_CP_AACI_BASE, |
368 | .res = { | 357 | INTEGRATOR_CP_AACI_IRQS, NULL); |
369 | .start = INTEGRATOR_CP_AACI_BASE, | ||
370 | .end = INTEGRATOR_CP_AACI_BASE + SZ_4K - 1, | ||
371 | .flags = IORESOURCE_MEM, | ||
372 | }, | ||
373 | .irq = { IRQ_CP_AACIINT, NO_IRQ }, | ||
374 | .periphid = 0, | ||
375 | }; | ||
376 | 358 | ||
377 | 359 | ||
378 | /* | 360 | /* |
@@ -425,21 +407,8 @@ static struct clcd_board clcd_data = { | |||
425 | .remove = versatile_clcd_remove_dma, | 407 | .remove = versatile_clcd_remove_dma, |
426 | }; | 408 | }; |
427 | 409 | ||
428 | static struct amba_device clcd_device = { | 410 | static AMBA_AHB_DEVICE(clcd, "mb:c0", 0, INTCP_PA_CLCD_BASE, |
429 | .dev = { | 411 | { IRQ_CP_CLCDCINT }, &clcd_data); |
430 | .init_name = "mb:c0", | ||
431 | .coherent_dma_mask = ~0, | ||
432 | .platform_data = &clcd_data, | ||
433 | }, | ||
434 | .res = { | ||
435 | .start = INTCP_PA_CLCD_BASE, | ||
436 | .end = INTCP_PA_CLCD_BASE + SZ_4K - 1, | ||
437 | .flags = IORESOURCE_MEM, | ||
438 | }, | ||
439 | .dma_mask = ~0, | ||
440 | .irq = { IRQ_CP_CLCDCINT, NO_IRQ }, | ||
441 | .periphid = 0, | ||
442 | }; | ||
443 | 412 | ||
444 | static struct amba_device *amba_devs[] __initdata = { | 413 | static struct amba_device *amba_devs[] __initdata = { |
445 | &mmc_device, | 414 | &mmc_device, |