diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2011-08-27 09:43:54 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2011-08-27 10:06:11 -0400 |
commit | 7b1bb388bc879ffcc6c69b567816d5c354afe42b (patch) | |
tree | 5a217fdfb0b5e5a327bdcd624506337c1ae1fe32 /arch/arm/mach-realview | |
parent | 7d754596756240fa918b94cd0c3011c77a638987 (diff) | |
parent | 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff) |
Merge 'Linux v3.0' into Litmus
Some notes:
* Litmus^RT scheduling class is the topmost scheduling class
(above stop_sched_class).
* scheduler_ipi() function (e.g., in smp_reschedule_interrupt())
may increase IPI latencies.
* Added path into schedule() to quickly re-evaluate scheduling
decision without becoming preemptive again. This used to be
a standard path before the removal of BKL.
Conflicts:
Makefile
arch/arm/kernel/calls.S
arch/arm/kernel/smp.c
arch/x86/include/asm/unistd_32.h
arch/x86/kernel/smp.c
arch/x86/kernel/syscall_table_32.S
include/linux/hrtimer.h
kernel/printk.c
kernel/sched.c
kernel/sched_fair.c
Diffstat (limited to 'arch/arm/mach-realview')
-rw-r--r-- | arch/arm/mach-realview/Kconfig | 54 | ||||
-rw-r--r-- | arch/arm/mach-realview/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/mach-realview/core.c | 300 | ||||
-rw-r--r-- | arch/arm/mach-realview/core.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-realview/headsmp.S | 39 | ||||
-rw-r--r-- | arch/arm/mach-realview/hotplug.c | 44 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/barriers.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/debug-macro.S | 10 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/entry-macro.S | 65 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/memory.h | 13 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/smp.h | 23 | ||||
-rw-r--r-- | arch/arm/mach-realview/localtimer.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-realview/platsmp.c | 175 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_eb.c | 40 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pb1176.c | 37 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pb11mp.c | 36 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pba8.c | 32 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pbx.c | 39 |
18 files changed, 174 insertions, 767 deletions
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig index b4575ae9648e..b9a9805e4828 100644 --- a/arch/arm/mach-realview/Kconfig +++ b/arch/arm/mach-realview/Kconfig | |||
@@ -2,52 +2,57 @@ menu "RealView platform type" | |||
2 | depends on ARCH_REALVIEW | 2 | depends on ARCH_REALVIEW |
3 | 3 | ||
4 | config MACH_REALVIEW_EB | 4 | config MACH_REALVIEW_EB |
5 | bool "Support RealView/EB platform" | 5 | bool "Support RealView(R) Emulation Baseboard" |
6 | select ARM_GIC | 6 | select ARM_GIC |
7 | help | 7 | help |
8 | Include support for the ARM(R) RealView Emulation Baseboard platform. | 8 | Include support for the ARM(R) RealView(R) Emulation Baseboard |
9 | platform. | ||
9 | 10 | ||
10 | config REALVIEW_EB_A9MP | 11 | config REALVIEW_EB_A9MP |
11 | bool "Support Multicore Cortex-A9" | 12 | bool "Support Multicore Cortex-A9 Tile" |
12 | depends on MACH_REALVIEW_EB | 13 | depends on MACH_REALVIEW_EB |
13 | select CPU_V7 | 14 | select CPU_V7 |
14 | help | 15 | help |
15 | Enable support for the Cortex-A9MPCore tile on the Realview platform. | 16 | Enable support for the Cortex-A9MPCore tile fitted to the |
17 | Realview(R) Emulation Baseboard platform. | ||
16 | 18 | ||
17 | config REALVIEW_EB_ARM11MP | 19 | config REALVIEW_EB_ARM11MP |
18 | bool "Support ARM11MPCore tile" | 20 | bool "Support ARM11MPCore Tile" |
19 | depends on MACH_REALVIEW_EB | 21 | depends on MACH_REALVIEW_EB |
20 | select CPU_V6 | 22 | select CPU_V6K |
21 | select ARCH_HAS_BARRIERS if SMP | 23 | select ARCH_HAS_BARRIERS if SMP |
22 | help | 24 | help |
23 | Enable support for the ARM11MPCore tile on the Realview platform. | 25 | Enable support for the ARM11MPCore tile fitted to the Realview(R) |
26 | Emulation Baseboard platform. | ||
24 | 27 | ||
25 | config REALVIEW_EB_ARM11MP_REVB | 28 | config REALVIEW_EB_ARM11MP_REVB |
26 | bool "Support ARM11MPCore RevB tile" | 29 | bool "Support ARM11MPCore RevB Tile" |
27 | depends on REALVIEW_EB_ARM11MP | 30 | depends on REALVIEW_EB_ARM11MP |
28 | help | 31 | help |
29 | Enable support for the ARM11MPCore RevB tile on the Realview | 32 | Enable support for the ARM11MPCore Revision B tile on the |
30 | platform. Since there are device address differences, a | 33 | Realview(R) Emulation Baseboard platform. Since there are device |
31 | kernel built with this option enabled is not compatible with | 34 | address differences, a kernel built with this option enabled is |
32 | other revisions of the ARM11MPCore tile. | 35 | not compatible with other revisions of the ARM11MPCore tile. |
33 | 36 | ||
34 | config MACH_REALVIEW_PB11MP | 37 | config MACH_REALVIEW_PB11MP |
35 | bool "Support RealView/PB11MPCore platform" | 38 | bool "Support RealView(R) Platform Baseboard for ARM11MPCore" |
36 | select CPU_V6 | 39 | select CPU_V6K |
37 | select ARM_GIC | 40 | select ARM_GIC |
38 | select HAVE_PATA_PLATFORM | 41 | select HAVE_PATA_PLATFORM |
39 | select ARCH_HAS_BARRIERS if SMP | 42 | select ARCH_HAS_BARRIERS if SMP |
40 | help | 43 | help |
41 | Include support for the ARM(R) RealView MPCore Platform Baseboard. | 44 | Include support for the ARM(R) RealView(R) Platform Baseboard for |
42 | PB11MPCore is a platform with an on-board ARM11MPCore and has | 45 | the ARM11MPCore. This platform has an on-board ARM11MPCore and has |
43 | support for PCI-E and Compact Flash. | 46 | support for PCI-E and Compact Flash. |
44 | 47 | ||
48 | # ARMv6 CPU without K extensions, but does have the new exclusive ops | ||
45 | config MACH_REALVIEW_PB1176 | 49 | config MACH_REALVIEW_PB1176 |
46 | bool "Support RealView/PB1176 platform" | 50 | bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S" |
47 | select CPU_V6 | 51 | select CPU_V6 |
48 | select ARM_GIC | 52 | select ARM_GIC |
49 | help | 53 | help |
50 | Include support for the ARM(R) RealView ARM1176 Platform Baseboard. | 54 | Include support for the ARM(R) RealView(R) Platform Baseboard for |
55 | ARM1176JZF-S. | ||
51 | 56 | ||
52 | config REALVIEW_PB1176_SECURE_FLASH | 57 | config REALVIEW_PB1176_SECURE_FLASH |
53 | bool "Allow access to the secure flash memory block" | 58 | bool "Allow access to the secure flash memory block" |
@@ -59,23 +64,24 @@ config REALVIEW_PB1176_SECURE_FLASH | |||
59 | block (64MB @ 0x3c000000) is required. | 64 | block (64MB @ 0x3c000000) is required. |
60 | 65 | ||
61 | config MACH_REALVIEW_PBA8 | 66 | config MACH_REALVIEW_PBA8 |
62 | bool "Support RealView/PB-A8 platform" | 67 | bool "Support RealView(R) Platform Baseboard for Cortex(tm)-A8 platform" |
63 | select CPU_V7 | 68 | select CPU_V7 |
64 | select ARM_GIC | 69 | select ARM_GIC |
65 | select HAVE_PATA_PLATFORM | 70 | select HAVE_PATA_PLATFORM |
66 | help | 71 | help |
67 | Include support for the ARM(R) RealView Cortex-A8 Platform Baseboard. | 72 | Include support for the ARM(R) RealView Platform Baseboard for |
68 | PB-A8 is a platform with an on-board Cortex-A8 and has support for | 73 | Cortex(tm)-A8. This platform has an on-board Cortex-A8 and has |
69 | PCI-E and Compact Flash. | 74 | support for PCI-E and Compact Flash. |
70 | 75 | ||
71 | config MACH_REALVIEW_PBX | 76 | config MACH_REALVIEW_PBX |
72 | bool "Support RealView/PBX platform" | 77 | bool "Support RealView(R) Platform Baseboard Explore" |
73 | select ARM_GIC | 78 | select ARM_GIC |
74 | select HAVE_PATA_PLATFORM | 79 | select HAVE_PATA_PLATFORM |
75 | select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET | 80 | select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET |
76 | select ZONE_DMA if SPARSEMEM | 81 | select ZONE_DMA if SPARSEMEM |
77 | help | 82 | help |
78 | Include support for the ARM(R) RealView PBX platform. | 83 | Include support for the ARM(R) RealView(R) Platform Baseboard |
84 | Explore. | ||
79 | 85 | ||
80 | config REALVIEW_HIGH_PHYS_OFFSET | 86 | config REALVIEW_HIGH_PHYS_OFFSET |
81 | bool "High physical base address for the RealView platform" | 87 | bool "High physical base address for the RealView platform" |
diff --git a/arch/arm/mach-realview/Makefile b/arch/arm/mach-realview/Makefile index a01b76b7c956..541fa4c109ef 100644 --- a/arch/arm/mach-realview/Makefile +++ b/arch/arm/mach-realview/Makefile | |||
@@ -8,6 +8,5 @@ obj-$(CONFIG_MACH_REALVIEW_PB11MP) += realview_pb11mp.o | |||
8 | obj-$(CONFIG_MACH_REALVIEW_PB1176) += realview_pb1176.o | 8 | obj-$(CONFIG_MACH_REALVIEW_PB1176) += realview_pb1176.o |
9 | obj-$(CONFIG_MACH_REALVIEW_PBA8) += realview_pba8.o | 9 | obj-$(CONFIG_MACH_REALVIEW_PBA8) += realview_pba8.o |
10 | obj-$(CONFIG_MACH_REALVIEW_PBX) += realview_pbx.o | 10 | obj-$(CONFIG_MACH_REALVIEW_PBX) += realview_pbx.o |
11 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 11 | obj-$(CONFIG_SMP) += platsmp.o |
12 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 12 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
13 | obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o | ||
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 2fa38df28414..5c23450d2d1d 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -30,8 +30,9 @@ | |||
30 | #include <linux/ata_platform.h> | 30 | #include <linux/ata_platform.h> |
31 | #include <linux/amba/mmci.h> | 31 | #include <linux/amba/mmci.h> |
32 | #include <linux/gfp.h> | 32 | #include <linux/gfp.h> |
33 | #include <linux/clkdev.h> | ||
34 | #include <linux/mtd/physmap.h> | ||
33 | 35 | ||
34 | #include <asm/clkdev.h> | ||
35 | #include <asm/system.h> | 36 | #include <asm/system.h> |
36 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
37 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
@@ -41,64 +42,23 @@ | |||
41 | #include <asm/hardware/icst.h> | 42 | #include <asm/hardware/icst.h> |
42 | 43 | ||
43 | #include <asm/mach/arch.h> | 44 | #include <asm/mach/arch.h> |
44 | #include <asm/mach/flash.h> | ||
45 | #include <asm/mach/irq.h> | 45 | #include <asm/mach/irq.h> |
46 | #include <asm/mach/map.h> | 46 | #include <asm/mach/map.h> |
47 | 47 | ||
48 | #include <asm/hardware/gic.h> | 48 | #include <asm/hardware/gic.h> |
49 | 49 | ||
50 | #include <mach/clkdev.h> | ||
51 | #include <mach/platform.h> | 50 | #include <mach/platform.h> |
52 | #include <mach/irqs.h> | 51 | #include <mach/irqs.h> |
53 | #include <plat/timer-sp.h> | 52 | #include <asm/hardware/timer-sp.h> |
54 | 53 | ||
55 | #include "core.h" | 54 | #include <plat/clcd.h> |
56 | 55 | #include <plat/sched_clock.h> | |
57 | /* used by entry-macro.S and platsmp.c */ | ||
58 | void __iomem *gic_cpu_base_addr; | ||
59 | |||
60 | #ifdef CONFIG_ZONE_DMA | ||
61 | /* | ||
62 | * Adjust the zones if there are restrictions for DMA access. | ||
63 | */ | ||
64 | void __init realview_adjust_zones(unsigned long *size, unsigned long *hole) | ||
65 | { | ||
66 | unsigned long dma_size = SZ_256M >> PAGE_SHIFT; | ||
67 | |||
68 | if (!machine_is_realview_pbx() || size[0] <= dma_size) | ||
69 | return; | ||
70 | |||
71 | size[ZONE_NORMAL] = size[0] - dma_size; | ||
72 | size[ZONE_DMA] = dma_size; | ||
73 | hole[ZONE_NORMAL] = hole[0]; | ||
74 | hole[ZONE_DMA] = 0; | ||
75 | } | ||
76 | #endif | ||
77 | 56 | ||
57 | #include "core.h" | ||
78 | 58 | ||
79 | #define REALVIEW_FLASHCTRL (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_FLASH_OFFSET) | 59 | #define REALVIEW_FLASHCTRL (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_FLASH_OFFSET) |
80 | 60 | ||
81 | static int realview_flash_init(void) | 61 | static void realview_flash_set_vpp(struct platform_device *pdev, int on) |
82 | { | ||
83 | u32 val; | ||
84 | |||
85 | val = __raw_readl(REALVIEW_FLASHCTRL); | ||
86 | val &= ~REALVIEW_FLASHPROG_FLVPPEN; | ||
87 | __raw_writel(val, REALVIEW_FLASHCTRL); | ||
88 | |||
89 | return 0; | ||
90 | } | ||
91 | |||
92 | static void realview_flash_exit(void) | ||
93 | { | ||
94 | u32 val; | ||
95 | |||
96 | val = __raw_readl(REALVIEW_FLASHCTRL); | ||
97 | val &= ~REALVIEW_FLASHPROG_FLVPPEN; | ||
98 | __raw_writel(val, REALVIEW_FLASHCTRL); | ||
99 | } | ||
100 | |||
101 | static void realview_flash_set_vpp(int on) | ||
102 | { | 62 | { |
103 | u32 val; | 63 | u32 val; |
104 | 64 | ||
@@ -110,16 +70,13 @@ static void realview_flash_set_vpp(int on) | |||
110 | __raw_writel(val, REALVIEW_FLASHCTRL); | 70 | __raw_writel(val, REALVIEW_FLASHCTRL); |
111 | } | 71 | } |
112 | 72 | ||
113 | static struct flash_platform_data realview_flash_data = { | 73 | static struct physmap_flash_data realview_flash_data = { |
114 | .map_name = "cfi_probe", | ||
115 | .width = 4, | 74 | .width = 4, |
116 | .init = realview_flash_init, | ||
117 | .exit = realview_flash_exit, | ||
118 | .set_vpp = realview_flash_set_vpp, | 75 | .set_vpp = realview_flash_set_vpp, |
119 | }; | 76 | }; |
120 | 77 | ||
121 | struct platform_device realview_flash_device = { | 78 | struct platform_device realview_flash_device = { |
122 | .name = "armflash", | 79 | .name = "physmap-flash", |
123 | .id = 0, | 80 | .id = 0, |
124 | .dev = { | 81 | .dev = { |
125 | .platform_data = &realview_flash_data, | 82 | .platform_data = &realview_flash_data, |
@@ -259,6 +216,7 @@ struct mmci_platform_data realview_mmc0_plat_data = { | |||
259 | .status = realview_mmc_status, | 216 | .status = realview_mmc_status, |
260 | .gpio_wp = 17, | 217 | .gpio_wp = 17, |
261 | .gpio_cd = 16, | 218 | .gpio_cd = 16, |
219 | .cd_invert = true, | ||
262 | }; | 220 | }; |
263 | 221 | ||
264 | struct mmci_platform_data realview_mmc1_plat_data = { | 222 | struct mmci_platform_data realview_mmc1_plat_data = { |
@@ -266,6 +224,7 @@ struct mmci_platform_data realview_mmc1_plat_data = { | |||
266 | .status = realview_mmc_status, | 224 | .status = realview_mmc_status, |
267 | .gpio_wp = 19, | 225 | .gpio_wp = 19, |
268 | .gpio_cd = 18, | 226 | .gpio_cd = 18, |
227 | .cd_invert = true, | ||
269 | }; | 228 | }; |
270 | 229 | ||
271 | /* | 230 | /* |
@@ -314,6 +273,10 @@ static struct clk ref24_clk = { | |||
314 | .rate = 24000000, | 273 | .rate = 24000000, |
315 | }; | 274 | }; |
316 | 275 | ||
276 | static struct clk sp804_clk = { | ||
277 | .rate = 1000000, | ||
278 | }; | ||
279 | |||
317 | static struct clk dummy_apb_pclk; | 280 | static struct clk dummy_apb_pclk; |
318 | 281 | ||
319 | static struct clk_lookup lookups[] = { | 282 | static struct clk_lookup lookups[] = { |
@@ -356,21 +319,25 @@ static struct clk_lookup lookups[] = { | |||
356 | }, { /* SSP */ | 319 | }, { /* SSP */ |
357 | .dev_id = "dev:ssp0", | 320 | .dev_id = "dev:ssp0", |
358 | .clk = &ref24_clk, | 321 | .clk = &ref24_clk, |
359 | } | 322 | }, { /* SP804 timers */ |
323 | .dev_id = "sp804", | ||
324 | .clk = &sp804_clk, | ||
325 | }, | ||
360 | }; | 326 | }; |
361 | 327 | ||
362 | static int __init clk_init(void) | 328 | void __init realview_init_early(void) |
363 | { | 329 | { |
330 | void __iomem *sys = __io_address(REALVIEW_SYS_BASE); | ||
331 | |||
364 | if (machine_is_realview_pb1176()) | 332 | if (machine_is_realview_pb1176()) |
365 | oscvco_clk.vcoreg = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC0_OFFSET; | 333 | oscvco_clk.vcoreg = sys + REALVIEW_SYS_OSC0_OFFSET; |
366 | else | 334 | else |
367 | oscvco_clk.vcoreg = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC4_OFFSET; | 335 | oscvco_clk.vcoreg = sys + REALVIEW_SYS_OSC4_OFFSET; |
368 | 336 | ||
369 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 337 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
370 | 338 | ||
371 | return 0; | 339 | versatile_sched_clock_init(sys + REALVIEW_SYS_24MHz_OFFSET, 24000000); |
372 | } | 340 | } |
373 | core_initcall(clk_init); | ||
374 | 341 | ||
375 | /* | 342 | /* |
376 | * CLCD support. | 343 | * CLCD support. |
@@ -385,157 +352,6 @@ core_initcall(clk_init); | |||
385 | #define SYS_CLCD_ID_SANYO_2_5 (0x07 << 8) | 352 | #define SYS_CLCD_ID_SANYO_2_5 (0x07 << 8) |
386 | #define SYS_CLCD_ID_VGA (0x1f << 8) | 353 | #define SYS_CLCD_ID_VGA (0x1f << 8) |
387 | 354 | ||
388 | static struct clcd_panel vga = { | ||
389 | .mode = { | ||
390 | .name = "VGA", | ||
391 | .refresh = 60, | ||
392 | .xres = 640, | ||
393 | .yres = 480, | ||
394 | .pixclock = 39721, | ||
395 | .left_margin = 40, | ||
396 | .right_margin = 24, | ||
397 | .upper_margin = 32, | ||
398 | .lower_margin = 11, | ||
399 | .hsync_len = 96, | ||
400 | .vsync_len = 2, | ||
401 | .sync = 0, | ||
402 | .vmode = FB_VMODE_NONINTERLACED, | ||
403 | }, | ||
404 | .width = -1, | ||
405 | .height = -1, | ||
406 | .tim2 = TIM2_BCD | TIM2_IPC, | ||
407 | .cntl = CNTL_LCDTFT | CNTL_BGR | CNTL_LCDVCOMP(1), | ||
408 | .bpp = 16, | ||
409 | }; | ||
410 | |||
411 | static struct clcd_panel xvga = { | ||
412 | .mode = { | ||
413 | .name = "XVGA", | ||
414 | .refresh = 60, | ||
415 | .xres = 1024, | ||
416 | .yres = 768, | ||
417 | .pixclock = 15748, | ||
418 | .left_margin = 152, | ||
419 | .right_margin = 48, | ||
420 | .upper_margin = 23, | ||
421 | .lower_margin = 3, | ||
422 | .hsync_len = 104, | ||
423 | .vsync_len = 4, | ||
424 | .sync = 0, | ||
425 | .vmode = FB_VMODE_NONINTERLACED, | ||
426 | }, | ||
427 | .width = -1, | ||
428 | .height = -1, | ||
429 | .tim2 = TIM2_BCD | TIM2_IPC, | ||
430 | .cntl = CNTL_LCDTFT | CNTL_BGR | CNTL_LCDVCOMP(1), | ||
431 | .bpp = 16, | ||
432 | }; | ||
433 | |||
434 | static struct clcd_panel sanyo_3_8_in = { | ||
435 | .mode = { | ||
436 | .name = "Sanyo QVGA", | ||
437 | .refresh = 116, | ||
438 | .xres = 320, | ||
439 | .yres = 240, | ||
440 | .pixclock = 100000, | ||
441 | .left_margin = 6, | ||
442 | .right_margin = 6, | ||
443 | .upper_margin = 5, | ||
444 | .lower_margin = 5, | ||
445 | .hsync_len = 6, | ||
446 | .vsync_len = 6, | ||
447 | .sync = 0, | ||
448 | .vmode = FB_VMODE_NONINTERLACED, | ||
449 | }, | ||
450 | .width = -1, | ||
451 | .height = -1, | ||
452 | .tim2 = TIM2_BCD, | ||
453 | .cntl = CNTL_LCDTFT | CNTL_BGR | CNTL_LCDVCOMP(1), | ||
454 | .bpp = 16, | ||
455 | }; | ||
456 | |||
457 | static struct clcd_panel sanyo_2_5_in = { | ||
458 | .mode = { | ||
459 | .name = "Sanyo QVGA Portrait", | ||
460 | .refresh = 116, | ||
461 | .xres = 240, | ||
462 | .yres = 320, | ||
463 | .pixclock = 100000, | ||
464 | .left_margin = 20, | ||
465 | .right_margin = 10, | ||
466 | .upper_margin = 2, | ||
467 | .lower_margin = 2, | ||
468 | .hsync_len = 10, | ||
469 | .vsync_len = 2, | ||
470 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
471 | .vmode = FB_VMODE_NONINTERLACED, | ||
472 | }, | ||
473 | .width = -1, | ||
474 | .height = -1, | ||
475 | .tim2 = TIM2_IVS | TIM2_IHS | TIM2_IPC, | ||
476 | .cntl = CNTL_LCDTFT | CNTL_BGR | CNTL_LCDVCOMP(1), | ||
477 | .bpp = 16, | ||
478 | }; | ||
479 | |||
480 | static struct clcd_panel epson_2_2_in = { | ||
481 | .mode = { | ||
482 | .name = "Epson QCIF", | ||
483 | .refresh = 390, | ||
484 | .xres = 176, | ||
485 | .yres = 220, | ||
486 | .pixclock = 62500, | ||
487 | .left_margin = 3, | ||
488 | .right_margin = 2, | ||
489 | .upper_margin = 1, | ||
490 | .lower_margin = 0, | ||
491 | .hsync_len = 3, | ||
492 | .vsync_len = 2, | ||
493 | .sync = 0, | ||
494 | .vmode = FB_VMODE_NONINTERLACED, | ||
495 | }, | ||
496 | .width = -1, | ||
497 | .height = -1, | ||
498 | .tim2 = TIM2_BCD | TIM2_IPC, | ||
499 | .cntl = CNTL_LCDTFT | CNTL_BGR | CNTL_LCDVCOMP(1), | ||
500 | .bpp = 16, | ||
501 | }; | ||
502 | |||
503 | /* | ||
504 | * Detect which LCD panel is connected, and return the appropriate | ||
505 | * clcd_panel structure. Note: we do not have any information on | ||
506 | * the required timings for the 8.4in panel, so we presently assume | ||
507 | * VGA timings. | ||
508 | */ | ||
509 | static struct clcd_panel *realview_clcd_panel(void) | ||
510 | { | ||
511 | void __iomem *sys_clcd = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_CLCD_OFFSET; | ||
512 | struct clcd_panel *vga_panel; | ||
513 | struct clcd_panel *panel; | ||
514 | u32 val; | ||
515 | |||
516 | if (machine_is_realview_eb()) | ||
517 | vga_panel = &vga; | ||
518 | else | ||
519 | vga_panel = &xvga; | ||
520 | |||
521 | val = readl(sys_clcd) & SYS_CLCD_ID_MASK; | ||
522 | if (val == SYS_CLCD_ID_SANYO_3_8) | ||
523 | panel = &sanyo_3_8_in; | ||
524 | else if (val == SYS_CLCD_ID_SANYO_2_5) | ||
525 | panel = &sanyo_2_5_in; | ||
526 | else if (val == SYS_CLCD_ID_EPSON_2_2) | ||
527 | panel = &epson_2_2_in; | ||
528 | else if (val == SYS_CLCD_ID_VGA) | ||
529 | panel = vga_panel; | ||
530 | else { | ||
531 | printk(KERN_ERR "CLCD: unknown LCD panel ID 0x%08x, using VGA\n", | ||
532 | val); | ||
533 | panel = vga_panel; | ||
534 | } | ||
535 | |||
536 | return panel; | ||
537 | } | ||
538 | |||
539 | /* | 355 | /* |
540 | * Disable all display connectors on the interface module. | 356 | * Disable all display connectors on the interface module. |
541 | */ | 357 | */ |
@@ -565,56 +381,60 @@ static void realview_clcd_enable(struct clcd_fb *fb) | |||
565 | writel(val, sys_clcd); | 381 | writel(val, sys_clcd); |
566 | } | 382 | } |
567 | 383 | ||
384 | /* | ||
385 | * Detect which LCD panel is connected, and return the appropriate | ||
386 | * clcd_panel structure. Note: we do not have any information on | ||
387 | * the required timings for the 8.4in panel, so we presently assume | ||
388 | * VGA timings. | ||
389 | */ | ||
568 | static int realview_clcd_setup(struct clcd_fb *fb) | 390 | static int realview_clcd_setup(struct clcd_fb *fb) |
569 | { | 391 | { |
392 | void __iomem *sys_clcd = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_CLCD_OFFSET; | ||
393 | const char *panel_name, *vga_panel_name; | ||
570 | unsigned long framesize; | 394 | unsigned long framesize; |
571 | dma_addr_t dma; | 395 | u32 val; |
572 | 396 | ||
573 | if (machine_is_realview_eb()) | 397 | if (machine_is_realview_eb()) { |
574 | /* VGA, 16bpp */ | 398 | /* VGA, 16bpp */ |
575 | framesize = 640 * 480 * 2; | 399 | framesize = 640 * 480 * 2; |
576 | else | 400 | vga_panel_name = "VGA"; |
401 | } else { | ||
577 | /* XVGA, 16bpp */ | 402 | /* XVGA, 16bpp */ |
578 | framesize = 1024 * 768 * 2; | 403 | framesize = 1024 * 768 * 2; |
579 | 404 | vga_panel_name = "XVGA"; | |
580 | fb->panel = realview_clcd_panel(); | ||
581 | |||
582 | fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, framesize, | ||
583 | &dma, GFP_KERNEL | GFP_DMA); | ||
584 | if (!fb->fb.screen_base) { | ||
585 | printk(KERN_ERR "CLCD: unable to map framebuffer\n"); | ||
586 | return -ENOMEM; | ||
587 | } | 405 | } |
588 | 406 | ||
589 | fb->fb.fix.smem_start = dma; | 407 | val = readl(sys_clcd) & SYS_CLCD_ID_MASK; |
590 | fb->fb.fix.smem_len = framesize; | 408 | if (val == SYS_CLCD_ID_SANYO_3_8) |
591 | 409 | panel_name = "Sanyo TM38QV67A02A"; | |
592 | return 0; | 410 | else if (val == SYS_CLCD_ID_SANYO_2_5) |
593 | } | 411 | panel_name = "Sanyo QVGA Portrait"; |
412 | else if (val == SYS_CLCD_ID_EPSON_2_2) | ||
413 | panel_name = "Epson L2F50113T00"; | ||
414 | else if (val == SYS_CLCD_ID_VGA) | ||
415 | panel_name = vga_panel_name; | ||
416 | else { | ||
417 | pr_err("CLCD: unknown LCD panel ID 0x%08x, using VGA\n", val); | ||
418 | panel_name = vga_panel_name; | ||
419 | } | ||
594 | 420 | ||
595 | static int realview_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma) | 421 | fb->panel = versatile_clcd_get_panel(panel_name); |
596 | { | 422 | if (!fb->panel) |
597 | return dma_mmap_writecombine(&fb->dev->dev, vma, | 423 | return -EINVAL; |
598 | fb->fb.screen_base, | ||
599 | fb->fb.fix.smem_start, | ||
600 | fb->fb.fix.smem_len); | ||
601 | } | ||
602 | 424 | ||
603 | static void realview_clcd_remove(struct clcd_fb *fb) | 425 | return versatile_clcd_setup_dma(fb, framesize); |
604 | { | ||
605 | dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len, | ||
606 | fb->fb.screen_base, fb->fb.fix.smem_start); | ||
607 | } | 426 | } |
608 | 427 | ||
609 | struct clcd_board clcd_plat_data = { | 428 | struct clcd_board clcd_plat_data = { |
610 | .name = "RealView", | 429 | .name = "RealView", |
430 | .caps = CLCD_CAP_ALL, | ||
611 | .check = clcdfb_check, | 431 | .check = clcdfb_check, |
612 | .decode = clcdfb_decode, | 432 | .decode = clcdfb_decode, |
613 | .disable = realview_clcd_disable, | 433 | .disable = realview_clcd_disable, |
614 | .enable = realview_clcd_enable, | 434 | .enable = realview_clcd_enable, |
615 | .setup = realview_clcd_setup, | 435 | .setup = realview_clcd_setup, |
616 | .mmap = realview_clcd_mmap, | 436 | .mmap = versatile_clcd_mmap_dma, |
617 | .remove = realview_clcd_remove, | 437 | .remove = versatile_clcd_remove_dma, |
618 | }; | 438 | }; |
619 | 439 | ||
620 | #ifdef CONFIG_LEDS | 440 | #ifdef CONFIG_LEDS |
@@ -690,8 +510,8 @@ void __init realview_timer_init(unsigned int timer_irq) | |||
690 | writel(0, timer2_va_base + TIMER_CTRL); | 510 | writel(0, timer2_va_base + TIMER_CTRL); |
691 | writel(0, timer3_va_base + TIMER_CTRL); | 511 | writel(0, timer3_va_base + TIMER_CTRL); |
692 | 512 | ||
693 | sp804_clocksource_init(timer3_va_base); | 513 | sp804_clocksource_init(timer3_va_base, "timer3"); |
694 | sp804_clockevents_init(timer0_va_base, timer_irq); | 514 | sp804_clockevents_init(timer0_va_base, timer_irq, "timer0"); |
695 | } | 515 | } |
696 | 516 | ||
697 | /* | 517 | /* |
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h index 781bca68a9fa..5c83d1e87a03 100644 --- a/arch/arm/mach-realview/core.h +++ b/arch/arm/mach-realview/core.h | |||
@@ -42,7 +42,6 @@ static struct amba_device name##_device = { \ | |||
42 | }, \ | 42 | }, \ |
43 | .dma_mask = ~0, \ | 43 | .dma_mask = ~0, \ |
44 | .irq = base##_IRQ, \ | 44 | .irq = base##_IRQ, \ |
45 | /* .dma = base##_DMA,*/ \ | ||
46 | } | 45 | } |
47 | 46 | ||
48 | struct machine_desc; | 47 | struct machine_desc; |
@@ -53,7 +52,6 @@ extern struct platform_device realview_i2c_device; | |||
53 | extern struct mmci_platform_data realview_mmc0_plat_data; | 52 | extern struct mmci_platform_data realview_mmc0_plat_data; |
54 | extern struct mmci_platform_data realview_mmc1_plat_data; | 53 | extern struct mmci_platform_data realview_mmc1_plat_data; |
55 | extern struct clcd_board clcd_plat_data; | 54 | extern struct clcd_board clcd_plat_data; |
56 | extern void __iomem *gic_cpu_base_addr; | ||
57 | extern void __iomem *timer0_va_base; | 55 | extern void __iomem *timer0_va_base; |
58 | extern void __iomem *timer1_va_base; | 56 | extern void __iomem *timer1_va_base; |
59 | extern void __iomem *timer2_va_base; | 57 | extern void __iomem *timer2_va_base; |
@@ -64,6 +62,7 @@ extern void realview_timer_init(unsigned int timer_irq); | |||
64 | extern int realview_flash_register(struct resource *res, u32 num); | 62 | extern int realview_flash_register(struct resource *res, u32 num); |
65 | extern int realview_eth_register(const char *name, struct resource *res); | 63 | extern int realview_eth_register(const char *name, struct resource *res); |
66 | extern int realview_usb_register(struct resource *res); | 64 | extern int realview_usb_register(struct resource *res); |
65 | extern void realview_init_early(void); | ||
67 | extern void realview_fixup(struct machine_desc *mdesc, struct tag *tags, | 66 | extern void realview_fixup(struct machine_desc *mdesc, struct tag *tags, |
68 | char **from, struct meminfo *meminfo); | 67 | char **from, struct meminfo *meminfo); |
69 | extern void (*realview_reset)(char); | 68 | extern void (*realview_reset)(char); |
diff --git a/arch/arm/mach-realview/headsmp.S b/arch/arm/mach-realview/headsmp.S deleted file mode 100644 index 4075473cf68a..000000000000 --- a/arch/arm/mach-realview/headsmp.S +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-realview/headsmp.S | ||
3 | * | ||
4 | * Copyright (c) 2003 ARM Limited | ||
5 | * All Rights Reserved | ||
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 | #include <linux/linkage.h> | ||
12 | #include <linux/init.h> | ||
13 | |||
14 | __INIT | ||
15 | |||
16 | /* | ||
17 | * Realview specific entry point for secondary CPUs. This provides | ||
18 | * a "holding pen" into which all secondary cores are held until we're | ||
19 | * ready for them to initialise. | ||
20 | */ | ||
21 | ENTRY(realview_secondary_startup) | ||
22 | mrc p15, 0, r0, c0, c0, 5 | ||
23 | and r0, r0, #15 | ||
24 | adr r4, 1f | ||
25 | ldmia r4, {r5, r6} | ||
26 | sub r4, r4, r5 | ||
27 | add r6, r6, r4 | ||
28 | pen: ldr r7, [r6] | ||
29 | cmp r7, r0 | ||
30 | bne pen | ||
31 | |||
32 | /* | ||
33 | * we've been released from the holding pen: secondary_stack | ||
34 | * should now contain the SVC stack for this core | ||
35 | */ | ||
36 | b secondary_startup | ||
37 | |||
38 | 1: .long . | ||
39 | .long pen_release | ||
diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c index f95521a5e5ce..a87523d095e6 100644 --- a/arch/arm/mach-realview/hotplug.c +++ b/arch/arm/mach-realview/hotplug.c | |||
@@ -11,14 +11,11 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | #include <linux/completion.h> | ||
15 | 14 | ||
16 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
17 | 16 | ||
18 | extern volatile int pen_release; | 17 | extern volatile int pen_release; |
19 | 18 | ||
20 | static DECLARE_COMPLETION(cpu_killed); | ||
21 | |||
22 | static inline void cpu_enter_lowpower(void) | 19 | static inline void cpu_enter_lowpower(void) |
23 | { | 20 | { |
24 | unsigned int v; | 21 | unsigned int v; |
@@ -34,10 +31,10 @@ static inline void cpu_enter_lowpower(void) | |||
34 | " bic %0, %0, #0x20\n" | 31 | " bic %0, %0, #0x20\n" |
35 | " mcr p15, 0, %0, c1, c0, 1\n" | 32 | " mcr p15, 0, %0, c1, c0, 1\n" |
36 | " mrc p15, 0, %0, c1, c0, 0\n" | 33 | " mrc p15, 0, %0, c1, c0, 0\n" |
37 | " bic %0, %0, #0x04\n" | 34 | " bic %0, %0, %2\n" |
38 | " mcr p15, 0, %0, c1, c0, 0\n" | 35 | " mcr p15, 0, %0, c1, c0, 0\n" |
39 | : "=&r" (v) | 36 | : "=&r" (v) |
40 | : "r" (0) | 37 | : "r" (0), "Ir" (CR_C) |
41 | : "cc"); | 38 | : "cc"); |
42 | } | 39 | } |
43 | 40 | ||
@@ -46,17 +43,17 @@ static inline void cpu_leave_lowpower(void) | |||
46 | unsigned int v; | 43 | unsigned int v; |
47 | 44 | ||
48 | asm volatile( "mrc p15, 0, %0, c1, c0, 0\n" | 45 | asm volatile( "mrc p15, 0, %0, c1, c0, 0\n" |
49 | " orr %0, %0, #0x04\n" | 46 | " orr %0, %0, %1\n" |
50 | " mcr p15, 0, %0, c1, c0, 0\n" | 47 | " mcr p15, 0, %0, c1, c0, 0\n" |
51 | " mrc p15, 0, %0, c1, c0, 1\n" | 48 | " mrc p15, 0, %0, c1, c0, 1\n" |
52 | " orr %0, %0, #0x20\n" | 49 | " orr %0, %0, #0x20\n" |
53 | " mcr p15, 0, %0, c1, c0, 1\n" | 50 | " mcr p15, 0, %0, c1, c0, 1\n" |
54 | : "=&r" (v) | 51 | : "=&r" (v) |
55 | : | 52 | : "Ir" (CR_C) |
56 | : "cc"); | 53 | : "cc"); |
57 | } | 54 | } |
58 | 55 | ||
59 | static inline void platform_do_lowpower(unsigned int cpu) | 56 | static inline void platform_do_lowpower(unsigned int cpu, int *spurious) |
60 | { | 57 | { |
61 | /* | 58 | /* |
62 | * there is no power-control hardware on this platform, so all | 59 | * there is no power-control hardware on this platform, so all |
@@ -80,22 +77,19 @@ static inline void platform_do_lowpower(unsigned int cpu) | |||
80 | } | 77 | } |
81 | 78 | ||
82 | /* | 79 | /* |
83 | * getting here, means that we have come out of WFI without | 80 | * Getting here, means that we have come out of WFI without |
84 | * having been woken up - this shouldn't happen | 81 | * having been woken up - this shouldn't happen |
85 | * | 82 | * |
86 | * The trouble is, letting people know about this is not really | 83 | * Just note it happening - when we're woken, we can report |
87 | * possible, since we are currently running incoherently, and | 84 | * its occurrence. |
88 | * therefore cannot safely call printk() or anything else | ||
89 | */ | 85 | */ |
90 | #ifdef DEBUG | 86 | (*spurious)++; |
91 | printk("CPU%u: spurious wakeup call\n", cpu); | ||
92 | #endif | ||
93 | } | 87 | } |
94 | } | 88 | } |
95 | 89 | ||
96 | int platform_cpu_kill(unsigned int cpu) | 90 | int platform_cpu_kill(unsigned int cpu) |
97 | { | 91 | { |
98 | return wait_for_completion_timeout(&cpu_killed, 5000); | 92 | return 1; |
99 | } | 93 | } |
100 | 94 | ||
101 | /* | 95 | /* |
@@ -105,30 +99,22 @@ int platform_cpu_kill(unsigned int cpu) | |||
105 | */ | 99 | */ |
106 | void platform_cpu_die(unsigned int cpu) | 100 | void platform_cpu_die(unsigned int cpu) |
107 | { | 101 | { |
108 | #ifdef DEBUG | 102 | int spurious = 0; |
109 | unsigned int this_cpu = hard_smp_processor_id(); | ||
110 | |||
111 | if (cpu != this_cpu) { | ||
112 | printk(KERN_CRIT "Eek! platform_cpu_die running on %u, should be %u\n", | ||
113 | this_cpu, cpu); | ||
114 | BUG(); | ||
115 | } | ||
116 | #endif | ||
117 | |||
118 | printk(KERN_NOTICE "CPU%u: shutdown\n", cpu); | ||
119 | complete(&cpu_killed); | ||
120 | 103 | ||
121 | /* | 104 | /* |
122 | * we're ready for shutdown now, so do it | 105 | * we're ready for shutdown now, so do it |
123 | */ | 106 | */ |
124 | cpu_enter_lowpower(); | 107 | cpu_enter_lowpower(); |
125 | platform_do_lowpower(cpu); | 108 | platform_do_lowpower(cpu, &spurious); |
126 | 109 | ||
127 | /* | 110 | /* |
128 | * bring this CPU back into the world of cache | 111 | * bring this CPU back into the world of cache |
129 | * coherency, and then restore interrupts | 112 | * coherency, and then restore interrupts |
130 | */ | 113 | */ |
131 | cpu_leave_lowpower(); | 114 | cpu_leave_lowpower(); |
115 | |||
116 | if (spurious) | ||
117 | pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious); | ||
132 | } | 118 | } |
133 | 119 | ||
134 | int platform_cpu_disable(unsigned int cpu) | 120 | int platform_cpu_disable(unsigned int cpu) |
diff --git a/arch/arm/mach-realview/include/mach/barriers.h b/arch/arm/mach-realview/include/mach/barriers.h index 0c5d749d7b5f..9a732195aa1c 100644 --- a/arch/arm/mach-realview/include/mach/barriers.h +++ b/arch/arm/mach-realview/include/mach/barriers.h | |||
@@ -4,5 +4,5 @@ | |||
4 | * operation to deadlock the system. | 4 | * operation to deadlock the system. |
5 | */ | 5 | */ |
6 | #define mb() dsb() | 6 | #define mb() dsb() |
7 | #define rmb() dmb() | 7 | #define rmb() dsb() |
8 | #define wmb() mb() | 8 | #define wmb() mb() |
diff --git a/arch/arm/mach-realview/include/mach/debug-macro.S b/arch/arm/mach-realview/include/mach/debug-macro.S index 86622289b74e..90b687cbe04e 100644 --- a/arch/arm/mach-realview/include/mach/debug-macro.S +++ b/arch/arm/mach-realview/include/mach/debug-macro.S | |||
@@ -33,12 +33,10 @@ | |||
33 | #error "Unknown RealView platform" | 33 | #error "Unknown RealView platform" |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | .macro addruart, rx, tmp | 36 | .macro addruart, rp, rv |
37 | mrc p15, 0, \rx, c1, c0 | 37 | mov \rp, #DEBUG_LL_UART_OFFSET |
38 | tst \rx, #1 @ MMU enabled? | 38 | orr \rv, \rp, #0xfb000000 @ virtual base |
39 | moveq \rx, #0x10000000 | 39 | orr \rp, \rp, #0x10000000 @ physical base |
40 | movne \rx, #0xfb000000 @ virtual base | ||
41 | orr \rx, \rx, #DEBUG_LL_UART_OFFSET | ||
42 | .endm | 40 | .endm |
43 | 41 | ||
44 | #include <asm/hardware/debug-pl01x.S> | 42 | #include <asm/hardware/debug-pl01x.S> |
diff --git a/arch/arm/mach-realview/include/mach/entry-macro.S b/arch/arm/mach-realview/include/mach/entry-macro.S index 340a5c276946..4071164aebaa 100644 --- a/arch/arm/mach-realview/include/mach/entry-macro.S +++ b/arch/arm/mach-realview/include/mach/entry-macro.S | |||
@@ -8,74 +8,11 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | #include <mach/hardware.h> | 10 | #include <mach/hardware.h> |
11 | #include <asm/hardware/gic.h> | 11 | #include <asm/hardware/entry-macro-gic.S> |
12 | 12 | ||
13 | .macro disable_fiq | 13 | .macro disable_fiq |
14 | .endm | 14 | .endm |
15 | 15 | ||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | ldr \base, =gic_cpu_base_addr | ||
18 | ldr \base, [\base] | ||
19 | .endm | ||
20 | |||
21 | .macro arch_ret_to_user, tmp1, tmp2 | 16 | .macro arch_ret_to_user, tmp1, tmp2 |
22 | .endm | 17 | .endm |
23 | 18 | ||
24 | /* | ||
25 | * The interrupt numbering scheme is defined in the | ||
26 | * interrupt controller spec. To wit: | ||
27 | * | ||
28 | * Interrupts 0-15 are IPI | ||
29 | * 16-28 are reserved | ||
30 | * 29-31 are local. We allow 30 to be used for the watchdog. | ||
31 | * 32-1020 are global | ||
32 | * 1021-1022 are reserved | ||
33 | * 1023 is "spurious" (no interrupt) | ||
34 | * | ||
35 | * For now, we ignore all local interrupts so only return an interrupt if it's | ||
36 | * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs. | ||
37 | * | ||
38 | * A simple read from the controller will tell us the number of the highest | ||
39 | * priority enabled interrupt. We then just need to check whether it is in the | ||
40 | * valid range for an IRQ (30-1020 inclusive). | ||
41 | */ | ||
42 | |||
43 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
44 | |||
45 | ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */ | ||
46 | |||
47 | ldr \tmp, =1021 | ||
48 | |||
49 | bic \irqnr, \irqstat, #0x1c00 | ||
50 | |||
51 | cmp \irqnr, #29 | ||
52 | cmpcc \irqnr, \irqnr | ||
53 | cmpne \irqnr, \tmp | ||
54 | cmpcs \irqnr, \irqnr | ||
55 | |||
56 | .endm | ||
57 | |||
58 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
59 | * register) is preserved from the macro above. | ||
60 | * If there is an IPI, we immediately signal end of interrupt on the | ||
61 | * controller, since this requires the original irqstat value which | ||
62 | * we won't easily be able to recreate later. | ||
63 | */ | ||
64 | |||
65 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
66 | bic \irqnr, \irqstat, #0x1c00 | ||
67 | cmp \irqnr, #16 | ||
68 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
69 | cmpcs \irqnr, \irqnr | ||
70 | .endm | ||
71 | |||
72 | /* As above, this assumes that irqstat and base are preserved.. */ | ||
73 | |||
74 | .macro test_for_ltirq, irqnr, irqstat, base, tmp | ||
75 | bic \irqnr, \irqstat, #0x1c00 | ||
76 | mov \tmp, #0 | ||
77 | cmp \irqnr, #29 | ||
78 | moveq \tmp, #1 | ||
79 | streq \irqstat, [\base, #GIC_CPU_EOI] | ||
80 | cmp \tmp, #0 | ||
81 | .endm | ||
diff --git a/arch/arm/mach-realview/include/mach/memory.h b/arch/arm/mach-realview/include/mach/memory.h index 5dafc157b276..1759fa673eea 100644 --- a/arch/arm/mach-realview/include/mach/memory.h +++ b/arch/arm/mach-realview/include/mach/memory.h | |||
@@ -24,18 +24,13 @@ | |||
24 | * Physical DRAM offset. | 24 | * Physical DRAM offset. |
25 | */ | 25 | */ |
26 | #ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET | 26 | #ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET |
27 | #define PHYS_OFFSET UL(0x70000000) | 27 | #define PLAT_PHYS_OFFSET UL(0x70000000) |
28 | #else | 28 | #else |
29 | #define PHYS_OFFSET UL(0x00000000) | 29 | #define PLAT_PHYS_OFFSET UL(0x00000000) |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #if !defined(__ASSEMBLY__) && defined(CONFIG_ZONE_DMA) | 32 | #ifdef CONFIG_ZONE_DMA |
33 | extern void realview_adjust_zones(unsigned long *size, unsigned long *hole); | 33 | #define ARM_DMA_ZONE_SIZE SZ_256M |
34 | #define arch_adjust_zones(size, hole) \ | ||
35 | realview_adjust_zones(size, hole) | ||
36 | |||
37 | #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_256M - 1) | ||
38 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_256M) | ||
39 | #endif | 34 | #endif |
40 | 35 | ||
41 | #ifdef CONFIG_SPARSEMEM | 36 | #ifdef CONFIG_SPARSEMEM |
diff --git a/arch/arm/mach-realview/include/mach/smp.h b/arch/arm/mach-realview/include/mach/smp.h deleted file mode 100644 index dd53892d44a7..000000000000 --- a/arch/arm/mach-realview/include/mach/smp.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #ifndef ASMARM_ARCH_SMP_H | ||
2 | #define ASMARM_ARCH_SMP_H | ||
3 | |||
4 | |||
5 | #include <asm/hardware/gic.h> | ||
6 | |||
7 | #define hard_smp_processor_id() \ | ||
8 | ({ \ | ||
9 | unsigned int cpunum; \ | ||
10 | __asm__("mrc p15, 0, %0, c0, c0, 5" \ | ||
11 | : "=r" (cpunum)); \ | ||
12 | cpunum &= 0x0F; \ | ||
13 | }) | ||
14 | |||
15 | /* | ||
16 | * We use IRQ1 as the IPI | ||
17 | */ | ||
18 | static inline void smp_cross_call(const struct cpumask *mask) | ||
19 | { | ||
20 | gic_raise_softirq(mask, 1); | ||
21 | } | ||
22 | |||
23 | #endif | ||
diff --git a/arch/arm/mach-realview/localtimer.c b/arch/arm/mach-realview/localtimer.c deleted file mode 100644 index 60b4e111f459..000000000000 --- a/arch/arm/mach-realview/localtimer.c +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-realview/localtimer.c | ||
3 | * | ||
4 | * Copyright (C) 2002 ARM Ltd. | ||
5 | * All Rights Reserved | ||
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 | #include <linux/init.h> | ||
12 | #include <linux/smp.h> | ||
13 | #include <linux/clockchips.h> | ||
14 | |||
15 | #include <asm/irq.h> | ||
16 | #include <asm/smp_twd.h> | ||
17 | #include <asm/localtimer.h> | ||
18 | |||
19 | /* | ||
20 | * Setup the local clock events for a CPU. | ||
21 | */ | ||
22 | void __cpuinit local_timer_setup(struct clock_event_device *evt) | ||
23 | { | ||
24 | evt->irq = IRQ_LOCALTIMER; | ||
25 | twd_timer_setup(evt); | ||
26 | } | ||
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index 009265818d55..963bf0d8119a 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -10,32 +10,22 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/delay.h> | ||
14 | #include <linux/device.h> | ||
15 | #include <linux/jiffies.h> | ||
16 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
17 | #include <linux/io.h> | 14 | #include <linux/io.h> |
18 | 15 | ||
19 | #include <asm/cacheflush.h> | ||
20 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
17 | #include <asm/hardware/gic.h> | ||
21 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
22 | #include <asm/localtimer.h> | 19 | #include <asm/smp_scu.h> |
23 | #include <asm/unified.h> | 20 | #include <asm/unified.h> |
24 | 21 | ||
25 | #include <mach/board-eb.h> | 22 | #include <mach/board-eb.h> |
26 | #include <mach/board-pb11mp.h> | 23 | #include <mach/board-pb11mp.h> |
27 | #include <mach/board-pbx.h> | 24 | #include <mach/board-pbx.h> |
28 | #include <asm/smp_scu.h> | ||
29 | 25 | ||
30 | #include "core.h" | 26 | #include "core.h" |
31 | 27 | ||
32 | extern void realview_secondary_startup(void); | 28 | extern void versatile_secondary_startup(void); |
33 | |||
34 | /* | ||
35 | * control for which core is the next to come out of the secondary | ||
36 | * boot "holding pen" | ||
37 | */ | ||
38 | volatile int __cpuinitdata pen_release = -1; | ||
39 | 29 | ||
40 | static void __iomem *scu_base_addr(void) | 30 | static void __iomem *scu_base_addr(void) |
41 | { | 31 | { |
@@ -50,134 +40,18 @@ static void __iomem *scu_base_addr(void) | |||
50 | return (void __iomem *)0; | 40 | return (void __iomem *)0; |
51 | } | 41 | } |
52 | 42 | ||
53 | static inline unsigned int get_core_count(void) | ||
54 | { | ||
55 | void __iomem *scu_base = scu_base_addr(); | ||
56 | if (scu_base) | ||
57 | return scu_get_core_count(scu_base); | ||
58 | return 1; | ||
59 | } | ||
60 | |||
61 | static DEFINE_SPINLOCK(boot_lock); | ||
62 | |||
63 | void __cpuinit platform_secondary_init(unsigned int cpu) | ||
64 | { | ||
65 | trace_hardirqs_off(); | ||
66 | |||
67 | /* | ||
68 | * if any interrupts are already enabled for the primary | ||
69 | * core (e.g. timer irq), then they will not have been enabled | ||
70 | * for us: do so | ||
71 | */ | ||
72 | gic_cpu_init(0, gic_cpu_base_addr); | ||
73 | |||
74 | /* | ||
75 | * let the primary processor know we're out of the | ||
76 | * pen, then head off into the C entry point | ||
77 | */ | ||
78 | pen_release = -1; | ||
79 | smp_wmb(); | ||
80 | |||
81 | /* | ||
82 | * Synchronise with the boot thread. | ||
83 | */ | ||
84 | spin_lock(&boot_lock); | ||
85 | spin_unlock(&boot_lock); | ||
86 | } | ||
87 | |||
88 | int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | ||
89 | { | ||
90 | unsigned long timeout; | ||
91 | |||
92 | /* | ||
93 | * set synchronisation state between this boot processor | ||
94 | * and the secondary one | ||
95 | */ | ||
96 | spin_lock(&boot_lock); | ||
97 | |||
98 | /* | ||
99 | * The secondary processor is waiting to be released from | ||
100 | * the holding pen - release it, then wait for it to flag | ||
101 | * that it has been released by resetting pen_release. | ||
102 | * | ||
103 | * Note that "pen_release" is the hardware CPU ID, whereas | ||
104 | * "cpu" is Linux's internal ID. | ||
105 | */ | ||
106 | pen_release = cpu; | ||
107 | flush_cache_all(); | ||
108 | |||
109 | /* | ||
110 | * XXX | ||
111 | * | ||
112 | * This is a later addition to the booting protocol: the | ||
113 | * bootMonitor now puts secondary cores into WFI, so | ||
114 | * poke_milo() no longer gets the cores moving; we need | ||
115 | * to send a soft interrupt to wake the secondary core. | ||
116 | * Use smp_cross_call() for this, since there's little | ||
117 | * point duplicating the code here | ||
118 | */ | ||
119 | smp_cross_call(cpumask_of(cpu)); | ||
120 | |||
121 | timeout = jiffies + (1 * HZ); | ||
122 | while (time_before(jiffies, timeout)) { | ||
123 | smp_rmb(); | ||
124 | if (pen_release == -1) | ||
125 | break; | ||
126 | |||
127 | udelay(10); | ||
128 | } | ||
129 | |||
130 | /* | ||
131 | * now the secondary core is starting up let it run its | ||
132 | * calibrations, then wait for it to finish | ||
133 | */ | ||
134 | spin_unlock(&boot_lock); | ||
135 | |||
136 | return pen_release != -1 ? -ENOSYS : 0; | ||
137 | } | ||
138 | |||
139 | static void __init poke_milo(void) | ||
140 | { | ||
141 | /* nobody is to be released from the pen yet */ | ||
142 | pen_release = -1; | ||
143 | |||
144 | /* | ||
145 | * Write the address of secondary startup into the system-wide flags | ||
146 | * register. The BootMonitor waits for this register to become | ||
147 | * non-zero. | ||
148 | */ | ||
149 | __raw_writel(BSYM(virt_to_phys(realview_secondary_startup)), | ||
150 | __io_address(REALVIEW_SYS_FLAGSSET)); | ||
151 | |||
152 | mb(); | ||
153 | } | ||
154 | |||
155 | /* | 43 | /* |
156 | * Initialise the CPU possible map early - this describes the CPUs | 44 | * Initialise the CPU possible map early - this describes the CPUs |
157 | * which may be present or become present in the system. | 45 | * which may be present or become present in the system. |
158 | */ | 46 | */ |
159 | void __init smp_init_cpus(void) | 47 | void __init smp_init_cpus(void) |
160 | { | 48 | { |
161 | unsigned int i, ncores = get_core_count(); | 49 | void __iomem *scu_base = scu_base_addr(); |
50 | unsigned int i, ncores; | ||
162 | 51 | ||
163 | for (i = 0; i < ncores; i++) | 52 | ncores = scu_base ? scu_get_core_count(scu_base) : 1; |
164 | set_cpu_possible(i, true); | ||
165 | } | ||
166 | |||
167 | void __init smp_prepare_cpus(unsigned int max_cpus) | ||
168 | { | ||
169 | unsigned int ncores = get_core_count(); | ||
170 | unsigned int cpu = smp_processor_id(); | ||
171 | int i; | ||
172 | 53 | ||
173 | /* sanity check */ | 54 | /* sanity check */ |
174 | if (ncores == 0) { | ||
175 | printk(KERN_ERR | ||
176 | "Realview: strange CM count of 0? Default to 1\n"); | ||
177 | |||
178 | ncores = 1; | ||
179 | } | ||
180 | |||
181 | if (ncores > NR_CPUS) { | 55 | if (ncores > NR_CPUS) { |
182 | printk(KERN_WARNING | 56 | printk(KERN_WARNING |
183 | "Realview: no. of cores (%d) greater than configured " | 57 | "Realview: no. of cores (%d) greater than configured " |
@@ -186,13 +60,15 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
186 | ncores = NR_CPUS; | 60 | ncores = NR_CPUS; |
187 | } | 61 | } |
188 | 62 | ||
189 | smp_store_cpu_info(cpu); | 63 | for (i = 0; i < ncores; i++) |
64 | set_cpu_possible(i, true); | ||
190 | 65 | ||
191 | /* | 66 | set_smp_cross_call(gic_raise_softirq); |
192 | * are we trying to boot more cores than exist? | 67 | } |
193 | */ | 68 | |
194 | if (max_cpus > ncores) | 69 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) |
195 | max_cpus = ncores; | 70 | { |
71 | int i; | ||
196 | 72 | ||
197 | /* | 73 | /* |
198 | * Initialise the present map, which describes the set of CPUs | 74 | * Initialise the present map, which describes the set of CPUs |
@@ -201,21 +77,14 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
201 | for (i = 0; i < max_cpus; i++) | 77 | for (i = 0; i < max_cpus; i++) |
202 | set_cpu_present(i, true); | 78 | set_cpu_present(i, true); |
203 | 79 | ||
80 | scu_enable(scu_base_addr()); | ||
81 | |||
204 | /* | 82 | /* |
205 | * Initialise the SCU if there are more than one CPU and let | 83 | * Write the address of secondary startup into the |
206 | * them know where to start. Note that, on modern versions of | 84 | * system-wide flags register. The BootMonitor waits |
207 | * MILO, the "poke" doesn't actually do anything until each | 85 | * until it receives a soft interrupt, and then the |
208 | * individual core is sent a soft interrupt to get it out of | 86 | * secondary CPU branches to this address. |
209 | * WFI | ||
210 | */ | 87 | */ |
211 | if (max_cpus > 1) { | 88 | __raw_writel(BSYM(virt_to_phys(versatile_secondary_startup)), |
212 | /* | 89 | __io_address(REALVIEW_SYS_FLAGSSET)); |
213 | * Enable the local timer or broadcast device for the | ||
214 | * boot CPU, but only if we have more than one CPU. | ||
215 | */ | ||
216 | percpu_timer_setup(); | ||
217 | |||
218 | scu_enable(scu_base_addr()); | ||
219 | poke_milo(); | ||
220 | } | ||
221 | } | 90 | } |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 991c1f8390e2..10e75faba4c9 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -144,60 +144,39 @@ static struct pl022_ssp_controller ssp0_plat_data = { | |||
144 | * These devices are connected via the core APB bridge | 144 | * These devices are connected via the core APB bridge |
145 | */ | 145 | */ |
146 | #define GPIO2_IRQ { IRQ_EB_GPIO2, NO_IRQ } | 146 | #define GPIO2_IRQ { IRQ_EB_GPIO2, NO_IRQ } |
147 | #define GPIO2_DMA { 0, 0 } | ||
148 | #define GPIO3_IRQ { IRQ_EB_GPIO3, NO_IRQ } | 147 | #define GPIO3_IRQ { IRQ_EB_GPIO3, NO_IRQ } |
149 | #define GPIO3_DMA { 0, 0 } | ||
150 | 148 | ||
151 | #define AACI_IRQ { IRQ_EB_AACI, NO_IRQ } | 149 | #define AACI_IRQ { IRQ_EB_AACI, NO_IRQ } |
152 | #define AACI_DMA { 0x80, 0x81 } | ||
153 | #define MMCI0_IRQ { IRQ_EB_MMCI0A, IRQ_EB_MMCI0B } | 150 | #define MMCI0_IRQ { IRQ_EB_MMCI0A, IRQ_EB_MMCI0B } |
154 | #define MMCI0_DMA { 0x84, 0 } | ||
155 | #define KMI0_IRQ { IRQ_EB_KMI0, NO_IRQ } | 151 | #define KMI0_IRQ { IRQ_EB_KMI0, NO_IRQ } |
156 | #define KMI0_DMA { 0, 0 } | ||
157 | #define KMI1_IRQ { IRQ_EB_KMI1, NO_IRQ } | 152 | #define KMI1_IRQ { IRQ_EB_KMI1, NO_IRQ } |
158 | #define KMI1_DMA { 0, 0 } | ||
159 | 153 | ||
160 | /* | 154 | /* |
161 | * These devices are connected directly to the multi-layer AHB switch | 155 | * These devices are connected directly to the multi-layer AHB switch |
162 | */ | 156 | */ |
163 | #define EB_SMC_IRQ { NO_IRQ, NO_IRQ } | 157 | #define EB_SMC_IRQ { NO_IRQ, NO_IRQ } |
164 | #define EB_SMC_DMA { 0, 0 } | ||
165 | #define MPMC_IRQ { NO_IRQ, NO_IRQ } | 158 | #define MPMC_IRQ { NO_IRQ, NO_IRQ } |
166 | #define MPMC_DMA { 0, 0 } | ||
167 | #define EB_CLCD_IRQ { IRQ_EB_CLCD, NO_IRQ } | 159 | #define EB_CLCD_IRQ { IRQ_EB_CLCD, NO_IRQ } |
168 | #define EB_CLCD_DMA { 0, 0 } | ||
169 | #define DMAC_IRQ { IRQ_EB_DMA, NO_IRQ } | 160 | #define DMAC_IRQ { IRQ_EB_DMA, NO_IRQ } |
170 | #define DMAC_DMA { 0, 0 } | ||
171 | 161 | ||
172 | /* | 162 | /* |
173 | * These devices are connected via the core APB bridge | 163 | * These devices are connected via the core APB bridge |
174 | */ | 164 | */ |
175 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } | 165 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } |
176 | #define SCTL_DMA { 0, 0 } | ||
177 | #define EB_WATCHDOG_IRQ { IRQ_EB_WDOG, NO_IRQ } | 166 | #define EB_WATCHDOG_IRQ { IRQ_EB_WDOG, NO_IRQ } |
178 | #define EB_WATCHDOG_DMA { 0, 0 } | ||
179 | #define EB_GPIO0_IRQ { IRQ_EB_GPIO0, NO_IRQ } | 167 | #define EB_GPIO0_IRQ { IRQ_EB_GPIO0, NO_IRQ } |
180 | #define EB_GPIO0_DMA { 0, 0 } | ||
181 | #define GPIO1_IRQ { IRQ_EB_GPIO1, NO_IRQ } | 168 | #define GPIO1_IRQ { IRQ_EB_GPIO1, NO_IRQ } |
182 | #define GPIO1_DMA { 0, 0 } | ||
183 | #define EB_RTC_IRQ { IRQ_EB_RTC, NO_IRQ } | 169 | #define EB_RTC_IRQ { IRQ_EB_RTC, NO_IRQ } |
184 | #define EB_RTC_DMA { 0, 0 } | ||
185 | 170 | ||
186 | /* | 171 | /* |
187 | * These devices are connected via the DMA APB bridge | 172 | * These devices are connected via the DMA APB bridge |
188 | */ | 173 | */ |
189 | #define SCI_IRQ { IRQ_EB_SCI, NO_IRQ } | 174 | #define SCI_IRQ { IRQ_EB_SCI, NO_IRQ } |
190 | #define SCI_DMA { 7, 6 } | ||
191 | #define EB_UART0_IRQ { IRQ_EB_UART0, NO_IRQ } | 175 | #define EB_UART0_IRQ { IRQ_EB_UART0, NO_IRQ } |
192 | #define EB_UART0_DMA { 15, 14 } | ||
193 | #define EB_UART1_IRQ { IRQ_EB_UART1, NO_IRQ } | 176 | #define EB_UART1_IRQ { IRQ_EB_UART1, NO_IRQ } |
194 | #define EB_UART1_DMA { 13, 12 } | ||
195 | #define EB_UART2_IRQ { IRQ_EB_UART2, NO_IRQ } | 177 | #define EB_UART2_IRQ { IRQ_EB_UART2, NO_IRQ } |
196 | #define EB_UART2_DMA { 11, 10 } | ||
197 | #define EB_UART3_IRQ { IRQ_EB_UART3, NO_IRQ } | 178 | #define EB_UART3_IRQ { IRQ_EB_UART3, NO_IRQ } |
198 | #define EB_UART3_DMA { 0x86, 0x87 } | ||
199 | #define EB_SSP_IRQ { IRQ_EB_SSP, NO_IRQ } | 179 | #define EB_SSP_IRQ { IRQ_EB_SSP, NO_IRQ } |
200 | #define EB_SSP_DMA { 9, 8 } | ||
201 | 180 | ||
202 | /* FPGA Primecells */ | 181 | /* FPGA Primecells */ |
203 | AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); | 182 | AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); |
@@ -364,21 +343,19 @@ static void __init gic_init_irq(void) | |||
364 | writel(0x00000000, __io_address(REALVIEW_SYS_LOCK)); | 343 | writel(0x00000000, __io_address(REALVIEW_SYS_LOCK)); |
365 | 344 | ||
366 | /* core tile GIC, primary */ | 345 | /* core tile GIC, primary */ |
367 | gic_cpu_base_addr = __io_address(REALVIEW_EB11MP_GIC_CPU_BASE); | 346 | gic_init(0, 29, __io_address(REALVIEW_EB11MP_GIC_DIST_BASE), |
368 | gic_dist_init(0, __io_address(REALVIEW_EB11MP_GIC_DIST_BASE), 29); | 347 | __io_address(REALVIEW_EB11MP_GIC_CPU_BASE)); |
369 | gic_cpu_init(0, gic_cpu_base_addr); | ||
370 | 348 | ||
371 | #ifndef CONFIG_REALVIEW_EB_ARM11MP_REVB | 349 | #ifndef CONFIG_REALVIEW_EB_ARM11MP_REVB |
372 | /* board GIC, secondary */ | 350 | /* board GIC, secondary */ |
373 | gic_dist_init(1, __io_address(REALVIEW_EB_GIC_DIST_BASE), 64); | 351 | gic_init(1, 96, __io_address(REALVIEW_EB_GIC_DIST_BASE), |
374 | gic_cpu_init(1, __io_address(REALVIEW_EB_GIC_CPU_BASE)); | 352 | __io_address(REALVIEW_EB_GIC_CPU_BASE)); |
375 | gic_cascade_irq(1, IRQ_EB11MP_EB_IRQ1); | 353 | gic_cascade_irq(1, IRQ_EB11MP_EB_IRQ1); |
376 | #endif | 354 | #endif |
377 | } else { | 355 | } else { |
378 | /* board GIC, primary */ | 356 | /* board GIC, primary */ |
379 | gic_cpu_base_addr = __io_address(REALVIEW_EB_GIC_CPU_BASE); | 357 | gic_init(0, 29, __io_address(REALVIEW_EB_GIC_DIST_BASE), |
380 | gic_dist_init(0, __io_address(REALVIEW_EB_GIC_DIST_BASE), 29); | 358 | __io_address(REALVIEW_EB_GIC_CPU_BASE)); |
381 | gic_cpu_init(0, gic_cpu_base_addr); | ||
382 | } | 359 | } |
383 | } | 360 | } |
384 | 361 | ||
@@ -486,11 +463,10 @@ static void __init realview_eb_init(void) | |||
486 | 463 | ||
487 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") | 464 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") |
488 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 465 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
489 | .phys_io = REALVIEW_EB_UART0_BASE & SECTION_MASK, | 466 | .boot_params = PLAT_PHYS_OFFSET + 0x00000100, |
490 | .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc, | ||
491 | .boot_params = PHYS_OFFSET + 0x00000100, | ||
492 | .fixup = realview_fixup, | 467 | .fixup = realview_fixup, |
493 | .map_io = realview_eb_map_io, | 468 | .map_io = realview_eb_map_io, |
469 | .init_early = realview_init_early, | ||
494 | .init_irq = gic_init_irq, | 470 | .init_irq = gic_init_irq, |
495 | .timer = &realview_eb_timer, | 471 | .timer = &realview_eb_timer, |
496 | .init_machine = realview_eb_init, | 472 | .init_machine = realview_eb_init, |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index d2be12eb829e..eab6070f66d0 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -134,47 +134,26 @@ static struct pl022_ssp_controller ssp0_plat_data = { | |||
134 | * RealView PB1176 AMBA devices | 134 | * RealView PB1176 AMBA devices |
135 | */ | 135 | */ |
136 | #define GPIO2_IRQ { IRQ_PB1176_GPIO2, NO_IRQ } | 136 | #define GPIO2_IRQ { IRQ_PB1176_GPIO2, NO_IRQ } |
137 | #define GPIO2_DMA { 0, 0 } | ||
138 | #define GPIO3_IRQ { IRQ_PB1176_GPIO3, NO_IRQ } | 137 | #define GPIO3_IRQ { IRQ_PB1176_GPIO3, NO_IRQ } |
139 | #define GPIO3_DMA { 0, 0 } | ||
140 | #define AACI_IRQ { IRQ_PB1176_AACI, NO_IRQ } | 138 | #define AACI_IRQ { IRQ_PB1176_AACI, NO_IRQ } |
141 | #define AACI_DMA { 0x80, 0x81 } | ||
142 | #define MMCI0_IRQ { IRQ_PB1176_MMCI0A, IRQ_PB1176_MMCI0B } | 139 | #define MMCI0_IRQ { IRQ_PB1176_MMCI0A, IRQ_PB1176_MMCI0B } |
143 | #define MMCI0_DMA { 0x84, 0 } | ||
144 | #define KMI0_IRQ { IRQ_PB1176_KMI0, NO_IRQ } | 140 | #define KMI0_IRQ { IRQ_PB1176_KMI0, NO_IRQ } |
145 | #define KMI0_DMA { 0, 0 } | ||
146 | #define KMI1_IRQ { IRQ_PB1176_KMI1, NO_IRQ } | 141 | #define KMI1_IRQ { IRQ_PB1176_KMI1, NO_IRQ } |
147 | #define KMI1_DMA { 0, 0 } | ||
148 | #define PB1176_SMC_IRQ { NO_IRQ, NO_IRQ } | 142 | #define PB1176_SMC_IRQ { NO_IRQ, NO_IRQ } |
149 | #define PB1176_SMC_DMA { 0, 0 } | ||
150 | #define MPMC_IRQ { NO_IRQ, NO_IRQ } | 143 | #define MPMC_IRQ { NO_IRQ, NO_IRQ } |
151 | #define MPMC_DMA { 0, 0 } | ||
152 | #define PB1176_CLCD_IRQ { IRQ_DC1176_CLCD, NO_IRQ } | 144 | #define PB1176_CLCD_IRQ { IRQ_DC1176_CLCD, NO_IRQ } |
153 | #define PB1176_CLCD_DMA { 0, 0 } | ||
154 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } | 145 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } |
155 | #define SCTL_DMA { 0, 0 } | ||
156 | #define PB1176_WATCHDOG_IRQ { IRQ_DC1176_WATCHDOG, NO_IRQ } | 146 | #define PB1176_WATCHDOG_IRQ { IRQ_DC1176_WATCHDOG, NO_IRQ } |
157 | #define PB1176_WATCHDOG_DMA { 0, 0 } | ||
158 | #define PB1176_GPIO0_IRQ { IRQ_PB1176_GPIO0, NO_IRQ } | 147 | #define PB1176_GPIO0_IRQ { IRQ_PB1176_GPIO0, NO_IRQ } |
159 | #define PB1176_GPIO0_DMA { 0, 0 } | ||
160 | #define GPIO1_IRQ { IRQ_PB1176_GPIO1, NO_IRQ } | 148 | #define GPIO1_IRQ { IRQ_PB1176_GPIO1, NO_IRQ } |
161 | #define GPIO1_DMA { 0, 0 } | ||
162 | #define PB1176_RTC_IRQ { IRQ_DC1176_RTC, NO_IRQ } | 149 | #define PB1176_RTC_IRQ { IRQ_DC1176_RTC, NO_IRQ } |
163 | #define PB1176_RTC_DMA { 0, 0 } | ||
164 | #define SCI_IRQ { IRQ_PB1176_SCI, NO_IRQ } | 150 | #define SCI_IRQ { IRQ_PB1176_SCI, NO_IRQ } |
165 | #define SCI_DMA { 7, 6 } | ||
166 | #define PB1176_UART0_IRQ { IRQ_DC1176_UART0, NO_IRQ } | 151 | #define PB1176_UART0_IRQ { IRQ_DC1176_UART0, NO_IRQ } |
167 | #define PB1176_UART0_DMA { 15, 14 } | ||
168 | #define PB1176_UART1_IRQ { IRQ_DC1176_UART1, NO_IRQ } | 152 | #define PB1176_UART1_IRQ { IRQ_DC1176_UART1, NO_IRQ } |
169 | #define PB1176_UART1_DMA { 13, 12 } | ||
170 | #define PB1176_UART2_IRQ { IRQ_DC1176_UART2, NO_IRQ } | 153 | #define PB1176_UART2_IRQ { IRQ_DC1176_UART2, NO_IRQ } |
171 | #define PB1176_UART2_DMA { 11, 10 } | ||
172 | #define PB1176_UART3_IRQ { IRQ_DC1176_UART3, NO_IRQ } | 154 | #define PB1176_UART3_IRQ { IRQ_DC1176_UART3, NO_IRQ } |
173 | #define PB1176_UART3_DMA { 0x86, 0x87 } | ||
174 | #define PB1176_UART4_IRQ { IRQ_PB1176_UART4, NO_IRQ } | 155 | #define PB1176_UART4_IRQ { IRQ_PB1176_UART4, NO_IRQ } |
175 | #define PB1176_UART4_DMA { 0, 0 } | ||
176 | #define PB1176_SSP_IRQ { IRQ_DC1176_SSP, NO_IRQ } | 156 | #define PB1176_SSP_IRQ { IRQ_DC1176_SSP, NO_IRQ } |
177 | #define PB1176_SSP_DMA { 9, 8 } | ||
178 | 157 | ||
179 | /* FPGA Primecells */ | 158 | /* FPGA Primecells */ |
180 | AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); | 159 | AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); |
@@ -304,13 +283,14 @@ static struct platform_device char_lcd_device = { | |||
304 | static void __init gic_init_irq(void) | 283 | static void __init gic_init_irq(void) |
305 | { | 284 | { |
306 | /* ARM1176 DevChip GIC, primary */ | 285 | /* ARM1176 DevChip GIC, primary */ |
307 | gic_cpu_base_addr = __io_address(REALVIEW_DC1176_GIC_CPU_BASE); | 286 | gic_init(0, IRQ_DC1176_GIC_START, |
308 | gic_dist_init(0, __io_address(REALVIEW_DC1176_GIC_DIST_BASE), IRQ_DC1176_GIC_START); | 287 | __io_address(REALVIEW_DC1176_GIC_DIST_BASE), |
309 | gic_cpu_init(0, gic_cpu_base_addr); | 288 | __io_address(REALVIEW_DC1176_GIC_CPU_BASE)); |
310 | 289 | ||
311 | /* board GIC, secondary */ | 290 | /* board GIC, secondary */ |
312 | gic_dist_init(1, __io_address(REALVIEW_PB1176_GIC_DIST_BASE), IRQ_PB1176_GIC_START); | 291 | gic_init(1, IRQ_PB1176_GIC_START, |
313 | gic_cpu_init(1, __io_address(REALVIEW_PB1176_GIC_CPU_BASE)); | 292 | __io_address(REALVIEW_PB1176_GIC_DIST_BASE), |
293 | __io_address(REALVIEW_PB1176_GIC_CPU_BASE)); | ||
314 | gic_cascade_irq(1, IRQ_DC1176_PB_IRQ1); | 294 | gic_cascade_irq(1, IRQ_DC1176_PB_IRQ1); |
315 | } | 295 | } |
316 | 296 | ||
@@ -378,11 +358,10 @@ static void __init realview_pb1176_init(void) | |||
378 | 358 | ||
379 | MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") | 359 | MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") |
380 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 360 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
381 | .phys_io = REALVIEW_PB1176_UART0_BASE & SECTION_MASK, | 361 | .boot_params = PLAT_PHYS_OFFSET + 0x00000100, |
382 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB1176_UART0_BASE) >> 18) & 0xfffc, | ||
383 | .boot_params = PHYS_OFFSET + 0x00000100, | ||
384 | .fixup = realview_pb1176_fixup, | 362 | .fixup = realview_pb1176_fixup, |
385 | .map_io = realview_pb1176_map_io, | 363 | .map_io = realview_pb1176_map_io, |
364 | .init_early = realview_init_early, | ||
386 | .init_irq = gic_init_irq, | 365 | .init_irq = gic_init_irq, |
387 | .timer = &realview_pb1176_timer, | 366 | .timer = &realview_pb1176_timer, |
388 | .init_machine = realview_pb1176_init, | 367 | .init_machine = realview_pb1176_init, |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index d591bc00b86e..b2985fc7cd4e 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -136,47 +136,26 @@ static struct pl022_ssp_controller ssp0_plat_data = { | |||
136 | */ | 136 | */ |
137 | 137 | ||
138 | #define GPIO2_IRQ { IRQ_PB11MP_GPIO2, NO_IRQ } | 138 | #define GPIO2_IRQ { IRQ_PB11MP_GPIO2, NO_IRQ } |
139 | #define GPIO2_DMA { 0, 0 } | ||
140 | #define GPIO3_IRQ { IRQ_PB11MP_GPIO3, NO_IRQ } | 139 | #define GPIO3_IRQ { IRQ_PB11MP_GPIO3, NO_IRQ } |
141 | #define GPIO3_DMA { 0, 0 } | ||
142 | #define AACI_IRQ { IRQ_TC11MP_AACI, NO_IRQ } | 140 | #define AACI_IRQ { IRQ_TC11MP_AACI, NO_IRQ } |
143 | #define AACI_DMA { 0x80, 0x81 } | ||
144 | #define MMCI0_IRQ { IRQ_TC11MP_MMCI0A, IRQ_TC11MP_MMCI0B } | 141 | #define MMCI0_IRQ { IRQ_TC11MP_MMCI0A, IRQ_TC11MP_MMCI0B } |
145 | #define MMCI0_DMA { 0x84, 0 } | ||
146 | #define KMI0_IRQ { IRQ_TC11MP_KMI0, NO_IRQ } | 142 | #define KMI0_IRQ { IRQ_TC11MP_KMI0, NO_IRQ } |
147 | #define KMI0_DMA { 0, 0 } | ||
148 | #define KMI1_IRQ { IRQ_TC11MP_KMI1, NO_IRQ } | 143 | #define KMI1_IRQ { IRQ_TC11MP_KMI1, NO_IRQ } |
149 | #define KMI1_DMA { 0, 0 } | ||
150 | #define PB11MP_SMC_IRQ { NO_IRQ, NO_IRQ } | 144 | #define PB11MP_SMC_IRQ { NO_IRQ, NO_IRQ } |
151 | #define PB11MP_SMC_DMA { 0, 0 } | ||
152 | #define MPMC_IRQ { NO_IRQ, NO_IRQ } | 145 | #define MPMC_IRQ { NO_IRQ, NO_IRQ } |
153 | #define MPMC_DMA { 0, 0 } | ||
154 | #define PB11MP_CLCD_IRQ { IRQ_PB11MP_CLCD, NO_IRQ } | 146 | #define PB11MP_CLCD_IRQ { IRQ_PB11MP_CLCD, NO_IRQ } |
155 | #define PB11MP_CLCD_DMA { 0, 0 } | ||
156 | #define DMAC_IRQ { IRQ_PB11MP_DMAC, NO_IRQ } | 147 | #define DMAC_IRQ { IRQ_PB11MP_DMAC, NO_IRQ } |
157 | #define DMAC_DMA { 0, 0 } | ||
158 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } | 148 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } |
159 | #define SCTL_DMA { 0, 0 } | ||
160 | #define PB11MP_WATCHDOG_IRQ { IRQ_PB11MP_WATCHDOG, NO_IRQ } | 149 | #define PB11MP_WATCHDOG_IRQ { IRQ_PB11MP_WATCHDOG, NO_IRQ } |
161 | #define PB11MP_WATCHDOG_DMA { 0, 0 } | ||
162 | #define PB11MP_GPIO0_IRQ { IRQ_PB11MP_GPIO0, NO_IRQ } | 150 | #define PB11MP_GPIO0_IRQ { IRQ_PB11MP_GPIO0, NO_IRQ } |
163 | #define PB11MP_GPIO0_DMA { 0, 0 } | ||
164 | #define GPIO1_IRQ { IRQ_PB11MP_GPIO1, NO_IRQ } | 151 | #define GPIO1_IRQ { IRQ_PB11MP_GPIO1, NO_IRQ } |
165 | #define GPIO1_DMA { 0, 0 } | ||
166 | #define PB11MP_RTC_IRQ { IRQ_TC11MP_RTC, NO_IRQ } | 152 | #define PB11MP_RTC_IRQ { IRQ_TC11MP_RTC, NO_IRQ } |
167 | #define PB11MP_RTC_DMA { 0, 0 } | ||
168 | #define SCI_IRQ { IRQ_PB11MP_SCI, NO_IRQ } | 153 | #define SCI_IRQ { IRQ_PB11MP_SCI, NO_IRQ } |
169 | #define SCI_DMA { 7, 6 } | ||
170 | #define PB11MP_UART0_IRQ { IRQ_TC11MP_UART0, NO_IRQ } | 154 | #define PB11MP_UART0_IRQ { IRQ_TC11MP_UART0, NO_IRQ } |
171 | #define PB11MP_UART0_DMA { 15, 14 } | ||
172 | #define PB11MP_UART1_IRQ { IRQ_TC11MP_UART1, NO_IRQ } | 155 | #define PB11MP_UART1_IRQ { IRQ_TC11MP_UART1, NO_IRQ } |
173 | #define PB11MP_UART1_DMA { 13, 12 } | ||
174 | #define PB11MP_UART2_IRQ { IRQ_PB11MP_UART2, NO_IRQ } | 156 | #define PB11MP_UART2_IRQ { IRQ_PB11MP_UART2, NO_IRQ } |
175 | #define PB11MP_UART2_DMA { 11, 10 } | ||
176 | #define PB11MP_UART3_IRQ { IRQ_PB11MP_UART3, NO_IRQ } | 157 | #define PB11MP_UART3_IRQ { IRQ_PB11MP_UART3, NO_IRQ } |
177 | #define PB11MP_UART3_DMA { 0x86, 0x87 } | ||
178 | #define PB11MP_SSP_IRQ { IRQ_PB11MP_SSP, NO_IRQ } | 158 | #define PB11MP_SSP_IRQ { IRQ_PB11MP_SSP, NO_IRQ } |
179 | #define PB11MP_SSP_DMA { 9, 8 } | ||
180 | 159 | ||
181 | /* FPGA Primecells */ | 160 | /* FPGA Primecells */ |
182 | AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); | 161 | AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); |
@@ -309,13 +288,13 @@ static void __init gic_init_irq(void) | |||
309 | writel(0x00000000, __io_address(REALVIEW_SYS_LOCK)); | 288 | writel(0x00000000, __io_address(REALVIEW_SYS_LOCK)); |
310 | 289 | ||
311 | /* ARM11MPCore test chip GIC, primary */ | 290 | /* ARM11MPCore test chip GIC, primary */ |
312 | gic_cpu_base_addr = __io_address(REALVIEW_TC11MP_GIC_CPU_BASE); | 291 | gic_init(0, 29, __io_address(REALVIEW_TC11MP_GIC_DIST_BASE), |
313 | gic_dist_init(0, __io_address(REALVIEW_TC11MP_GIC_DIST_BASE), 29); | 292 | __io_address(REALVIEW_TC11MP_GIC_CPU_BASE)); |
314 | gic_cpu_init(0, gic_cpu_base_addr); | ||
315 | 293 | ||
316 | /* board GIC, secondary */ | 294 | /* board GIC, secondary */ |
317 | gic_dist_init(1, __io_address(REALVIEW_PB11MP_GIC_DIST_BASE), IRQ_PB11MP_GIC_START); | 295 | gic_init(1, IRQ_PB11MP_GIC_START, |
318 | gic_cpu_init(1, __io_address(REALVIEW_PB11MP_GIC_CPU_BASE)); | 296 | __io_address(REALVIEW_PB11MP_GIC_DIST_BASE), |
297 | __io_address(REALVIEW_PB11MP_GIC_CPU_BASE)); | ||
319 | gic_cascade_irq(1, IRQ_TC11MP_PB_IRQ1); | 298 | gic_cascade_irq(1, IRQ_TC11MP_PB_IRQ1); |
320 | } | 299 | } |
321 | 300 | ||
@@ -381,11 +360,10 @@ static void __init realview_pb11mp_init(void) | |||
381 | 360 | ||
382 | MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") | 361 | MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") |
383 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 362 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
384 | .phys_io = REALVIEW_PB11MP_UART0_BASE & SECTION_MASK, | 363 | .boot_params = PLAT_PHYS_OFFSET + 0x00000100, |
385 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB11MP_UART0_BASE) >> 18) & 0xfffc, | ||
386 | .boot_params = PHYS_OFFSET + 0x00000100, | ||
387 | .fixup = realview_fixup, | 364 | .fixup = realview_fixup, |
388 | .map_io = realview_pb11mp_map_io, | 365 | .map_io = realview_pb11mp_map_io, |
366 | .init_early = realview_init_early, | ||
389 | .init_irq = gic_init_irq, | 367 | .init_irq = gic_init_irq, |
390 | .timer = &realview_pb11mp_timer, | 368 | .timer = &realview_pb11mp_timer, |
391 | .init_machine = realview_pb11mp_init, | 369 | .init_machine = realview_pb11mp_init, |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index 6c37621217bc..fb6866558760 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -126,47 +126,26 @@ static struct pl022_ssp_controller ssp0_plat_data = { | |||
126 | */ | 126 | */ |
127 | 127 | ||
128 | #define GPIO2_IRQ { IRQ_PBA8_GPIO2, NO_IRQ } | 128 | #define GPIO2_IRQ { IRQ_PBA8_GPIO2, NO_IRQ } |
129 | #define GPIO2_DMA { 0, 0 } | ||
130 | #define GPIO3_IRQ { IRQ_PBA8_GPIO3, NO_IRQ } | 129 | #define GPIO3_IRQ { IRQ_PBA8_GPIO3, NO_IRQ } |
131 | #define GPIO3_DMA { 0, 0 } | ||
132 | #define AACI_IRQ { IRQ_PBA8_AACI, NO_IRQ } | 130 | #define AACI_IRQ { IRQ_PBA8_AACI, NO_IRQ } |
133 | #define AACI_DMA { 0x80, 0x81 } | ||
134 | #define MMCI0_IRQ { IRQ_PBA8_MMCI0A, IRQ_PBA8_MMCI0B } | 131 | #define MMCI0_IRQ { IRQ_PBA8_MMCI0A, IRQ_PBA8_MMCI0B } |
135 | #define MMCI0_DMA { 0x84, 0 } | ||
136 | #define KMI0_IRQ { IRQ_PBA8_KMI0, NO_IRQ } | 132 | #define KMI0_IRQ { IRQ_PBA8_KMI0, NO_IRQ } |
137 | #define KMI0_DMA { 0, 0 } | ||
138 | #define KMI1_IRQ { IRQ_PBA8_KMI1, NO_IRQ } | 133 | #define KMI1_IRQ { IRQ_PBA8_KMI1, NO_IRQ } |
139 | #define KMI1_DMA { 0, 0 } | ||
140 | #define PBA8_SMC_IRQ { NO_IRQ, NO_IRQ } | 134 | #define PBA8_SMC_IRQ { NO_IRQ, NO_IRQ } |
141 | #define PBA8_SMC_DMA { 0, 0 } | ||
142 | #define MPMC_IRQ { NO_IRQ, NO_IRQ } | 135 | #define MPMC_IRQ { NO_IRQ, NO_IRQ } |
143 | #define MPMC_DMA { 0, 0 } | ||
144 | #define PBA8_CLCD_IRQ { IRQ_PBA8_CLCD, NO_IRQ } | 136 | #define PBA8_CLCD_IRQ { IRQ_PBA8_CLCD, NO_IRQ } |
145 | #define PBA8_CLCD_DMA { 0, 0 } | ||
146 | #define DMAC_IRQ { IRQ_PBA8_DMAC, NO_IRQ } | 137 | #define DMAC_IRQ { IRQ_PBA8_DMAC, NO_IRQ } |
147 | #define DMAC_DMA { 0, 0 } | ||
148 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } | 138 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } |
149 | #define SCTL_DMA { 0, 0 } | ||
150 | #define PBA8_WATCHDOG_IRQ { IRQ_PBA8_WATCHDOG, NO_IRQ } | 139 | #define PBA8_WATCHDOG_IRQ { IRQ_PBA8_WATCHDOG, NO_IRQ } |
151 | #define PBA8_WATCHDOG_DMA { 0, 0 } | ||
152 | #define PBA8_GPIO0_IRQ { IRQ_PBA8_GPIO0, NO_IRQ } | 140 | #define PBA8_GPIO0_IRQ { IRQ_PBA8_GPIO0, NO_IRQ } |
153 | #define PBA8_GPIO0_DMA { 0, 0 } | ||
154 | #define GPIO1_IRQ { IRQ_PBA8_GPIO1, NO_IRQ } | 141 | #define GPIO1_IRQ { IRQ_PBA8_GPIO1, NO_IRQ } |
155 | #define GPIO1_DMA { 0, 0 } | ||
156 | #define PBA8_RTC_IRQ { IRQ_PBA8_RTC, NO_IRQ } | 142 | #define PBA8_RTC_IRQ { IRQ_PBA8_RTC, NO_IRQ } |
157 | #define PBA8_RTC_DMA { 0, 0 } | ||
158 | #define SCI_IRQ { IRQ_PBA8_SCI, NO_IRQ } | 143 | #define SCI_IRQ { IRQ_PBA8_SCI, NO_IRQ } |
159 | #define SCI_DMA { 7, 6 } | ||
160 | #define PBA8_UART0_IRQ { IRQ_PBA8_UART0, NO_IRQ } | 144 | #define PBA8_UART0_IRQ { IRQ_PBA8_UART0, NO_IRQ } |
161 | #define PBA8_UART0_DMA { 15, 14 } | ||
162 | #define PBA8_UART1_IRQ { IRQ_PBA8_UART1, NO_IRQ } | 145 | #define PBA8_UART1_IRQ { IRQ_PBA8_UART1, NO_IRQ } |
163 | #define PBA8_UART1_DMA { 13, 12 } | ||
164 | #define PBA8_UART2_IRQ { IRQ_PBA8_UART2, NO_IRQ } | 146 | #define PBA8_UART2_IRQ { IRQ_PBA8_UART2, NO_IRQ } |
165 | #define PBA8_UART2_DMA { 11, 10 } | ||
166 | #define PBA8_UART3_IRQ { IRQ_PBA8_UART3, NO_IRQ } | 147 | #define PBA8_UART3_IRQ { IRQ_PBA8_UART3, NO_IRQ } |
167 | #define PBA8_UART3_DMA { 0x86, 0x87 } | ||
168 | #define PBA8_SSP_IRQ { IRQ_PBA8_SSP, NO_IRQ } | 148 | #define PBA8_SSP_IRQ { IRQ_PBA8_SSP, NO_IRQ } |
169 | #define PBA8_SSP_DMA { 9, 8 } | ||
170 | 149 | ||
171 | /* FPGA Primecells */ | 150 | /* FPGA Primecells */ |
172 | AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); | 151 | AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); |
@@ -273,9 +252,9 @@ static struct platform_device pmu_device = { | |||
273 | static void __init gic_init_irq(void) | 252 | static void __init gic_init_irq(void) |
274 | { | 253 | { |
275 | /* ARM PB-A8 on-board GIC */ | 254 | /* ARM PB-A8 on-board GIC */ |
276 | gic_cpu_base_addr = __io_address(REALVIEW_PBA8_GIC_CPU_BASE); | 255 | gic_init(0, IRQ_PBA8_GIC_START, |
277 | gic_dist_init(0, __io_address(REALVIEW_PBA8_GIC_DIST_BASE), IRQ_PBA8_GIC_START); | 256 | __io_address(REALVIEW_PBA8_GIC_DIST_BASE), |
278 | gic_cpu_init(0, __io_address(REALVIEW_PBA8_GIC_CPU_BASE)); | 257 | __io_address(REALVIEW_PBA8_GIC_CPU_BASE)); |
279 | } | 258 | } |
280 | 259 | ||
281 | static void __init realview_pba8_timer_init(void) | 260 | static void __init realview_pba8_timer_init(void) |
@@ -331,11 +310,10 @@ static void __init realview_pba8_init(void) | |||
331 | 310 | ||
332 | MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") | 311 | MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") |
333 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 312 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
334 | .phys_io = REALVIEW_PBA8_UART0_BASE & SECTION_MASK, | 313 | .boot_params = PLAT_PHYS_OFFSET + 0x00000100, |
335 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBA8_UART0_BASE) >> 18) & 0xfffc, | ||
336 | .boot_params = PHYS_OFFSET + 0x00000100, | ||
337 | .fixup = realview_fixup, | 314 | .fixup = realview_fixup, |
338 | .map_io = realview_pba8_map_io, | 315 | .map_io = realview_pba8_map_io, |
316 | .init_early = realview_init_early, | ||
339 | .init_irq = gic_init_irq, | 317 | .init_irq = gic_init_irq, |
340 | .timer = &realview_pba8_timer, | 318 | .timer = &realview_pba8_timer, |
341 | .init_machine = realview_pba8_init, | 319 | .init_machine = realview_pba8_init, |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index 9428eff0b116..92ace2cf2b2c 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -148,47 +148,26 @@ static struct pl022_ssp_controller ssp0_plat_data = { | |||
148 | */ | 148 | */ |
149 | 149 | ||
150 | #define GPIO2_IRQ { IRQ_PBX_GPIO2, NO_IRQ } | 150 | #define GPIO2_IRQ { IRQ_PBX_GPIO2, NO_IRQ } |
151 | #define GPIO2_DMA { 0, 0 } | ||
152 | #define GPIO3_IRQ { IRQ_PBX_GPIO3, NO_IRQ } | 151 | #define GPIO3_IRQ { IRQ_PBX_GPIO3, NO_IRQ } |
153 | #define GPIO3_DMA { 0, 0 } | ||
154 | #define AACI_IRQ { IRQ_PBX_AACI, NO_IRQ } | 152 | #define AACI_IRQ { IRQ_PBX_AACI, NO_IRQ } |
155 | #define AACI_DMA { 0x80, 0x81 } | ||
156 | #define MMCI0_IRQ { IRQ_PBX_MMCI0A, IRQ_PBX_MMCI0B } | 153 | #define MMCI0_IRQ { IRQ_PBX_MMCI0A, IRQ_PBX_MMCI0B } |
157 | #define MMCI0_DMA { 0x84, 0 } | ||
158 | #define KMI0_IRQ { IRQ_PBX_KMI0, NO_IRQ } | 154 | #define KMI0_IRQ { IRQ_PBX_KMI0, NO_IRQ } |
159 | #define KMI0_DMA { 0, 0 } | ||
160 | #define KMI1_IRQ { IRQ_PBX_KMI1, NO_IRQ } | 155 | #define KMI1_IRQ { IRQ_PBX_KMI1, NO_IRQ } |
161 | #define KMI1_DMA { 0, 0 } | ||
162 | #define PBX_SMC_IRQ { NO_IRQ, NO_IRQ } | 156 | #define PBX_SMC_IRQ { NO_IRQ, NO_IRQ } |
163 | #define PBX_SMC_DMA { 0, 0 } | ||
164 | #define MPMC_IRQ { NO_IRQ, NO_IRQ } | 157 | #define MPMC_IRQ { NO_IRQ, NO_IRQ } |
165 | #define MPMC_DMA { 0, 0 } | ||
166 | #define PBX_CLCD_IRQ { IRQ_PBX_CLCD, NO_IRQ } | 158 | #define PBX_CLCD_IRQ { IRQ_PBX_CLCD, NO_IRQ } |
167 | #define PBX_CLCD_DMA { 0, 0 } | ||
168 | #define DMAC_IRQ { IRQ_PBX_DMAC, NO_IRQ } | 159 | #define DMAC_IRQ { IRQ_PBX_DMAC, NO_IRQ } |
169 | #define DMAC_DMA { 0, 0 } | ||
170 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } | 160 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } |
171 | #define SCTL_DMA { 0, 0 } | ||
172 | #define PBX_WATCHDOG_IRQ { IRQ_PBX_WATCHDOG, NO_IRQ } | 161 | #define PBX_WATCHDOG_IRQ { IRQ_PBX_WATCHDOG, NO_IRQ } |
173 | #define PBX_WATCHDOG_DMA { 0, 0 } | ||
174 | #define PBX_GPIO0_IRQ { IRQ_PBX_GPIO0, NO_IRQ } | 162 | #define PBX_GPIO0_IRQ { IRQ_PBX_GPIO0, NO_IRQ } |
175 | #define PBX_GPIO0_DMA { 0, 0 } | ||
176 | #define GPIO1_IRQ { IRQ_PBX_GPIO1, NO_IRQ } | 163 | #define GPIO1_IRQ { IRQ_PBX_GPIO1, NO_IRQ } |
177 | #define GPIO1_DMA { 0, 0 } | ||
178 | #define PBX_RTC_IRQ { IRQ_PBX_RTC, NO_IRQ } | 164 | #define PBX_RTC_IRQ { IRQ_PBX_RTC, NO_IRQ } |
179 | #define PBX_RTC_DMA { 0, 0 } | ||
180 | #define SCI_IRQ { IRQ_PBX_SCI, NO_IRQ } | 165 | #define SCI_IRQ { IRQ_PBX_SCI, NO_IRQ } |
181 | #define SCI_DMA { 7, 6 } | ||
182 | #define PBX_UART0_IRQ { IRQ_PBX_UART0, NO_IRQ } | 166 | #define PBX_UART0_IRQ { IRQ_PBX_UART0, NO_IRQ } |
183 | #define PBX_UART0_DMA { 15, 14 } | ||
184 | #define PBX_UART1_IRQ { IRQ_PBX_UART1, NO_IRQ } | 167 | #define PBX_UART1_IRQ { IRQ_PBX_UART1, NO_IRQ } |
185 | #define PBX_UART1_DMA { 13, 12 } | ||
186 | #define PBX_UART2_IRQ { IRQ_PBX_UART2, NO_IRQ } | 168 | #define PBX_UART2_IRQ { IRQ_PBX_UART2, NO_IRQ } |
187 | #define PBX_UART2_DMA { 11, 10 } | ||
188 | #define PBX_UART3_IRQ { IRQ_PBX_UART3, NO_IRQ } | 169 | #define PBX_UART3_IRQ { IRQ_PBX_UART3, NO_IRQ } |
189 | #define PBX_UART3_DMA { 0x86, 0x87 } | ||
190 | #define PBX_SSP_IRQ { IRQ_PBX_SSP, NO_IRQ } | 170 | #define PBX_SSP_IRQ { IRQ_PBX_SSP, NO_IRQ } |
191 | #define PBX_SSP_DMA { 9, 8 } | ||
192 | 171 | ||
193 | /* FPGA Primecells */ | 172 | /* FPGA Primecells */ |
194 | AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); | 173 | AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); |
@@ -313,15 +292,12 @@ static void __init gic_init_irq(void) | |||
313 | { | 292 | { |
314 | /* ARM PBX on-board GIC */ | 293 | /* ARM PBX on-board GIC */ |
315 | if (core_tile_pbx11mp() || core_tile_pbxa9mp()) { | 294 | if (core_tile_pbx11mp() || core_tile_pbxa9mp()) { |
316 | gic_cpu_base_addr = __io_address(REALVIEW_PBX_TILE_GIC_CPU_BASE); | 295 | gic_init(0, 29, __io_address(REALVIEW_PBX_TILE_GIC_DIST_BASE), |
317 | gic_dist_init(0, __io_address(REALVIEW_PBX_TILE_GIC_DIST_BASE), | 296 | __io_address(REALVIEW_PBX_TILE_GIC_CPU_BASE)); |
318 | 29); | ||
319 | gic_cpu_init(0, __io_address(REALVIEW_PBX_TILE_GIC_CPU_BASE)); | ||
320 | } else { | 297 | } else { |
321 | gic_cpu_base_addr = __io_address(REALVIEW_PBX_GIC_CPU_BASE); | 298 | gic_init(0, IRQ_PBX_GIC_START, |
322 | gic_dist_init(0, __io_address(REALVIEW_PBX_GIC_DIST_BASE), | 299 | __io_address(REALVIEW_PBX_GIC_DIST_BASE), |
323 | IRQ_PBX_GIC_START); | 300 | __io_address(REALVIEW_PBX_GIC_CPU_BASE)); |
324 | gic_cpu_init(0, __io_address(REALVIEW_PBX_GIC_CPU_BASE)); | ||
325 | } | 301 | } |
326 | } | 302 | } |
327 | 303 | ||
@@ -417,11 +393,10 @@ static void __init realview_pbx_init(void) | |||
417 | 393 | ||
418 | MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") | 394 | MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") |
419 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 395 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
420 | .phys_io = REALVIEW_PBX_UART0_BASE & SECTION_MASK, | 396 | .boot_params = PLAT_PHYS_OFFSET + 0x00000100, |
421 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBX_UART0_BASE) >> 18) & 0xfffc, | ||
422 | .boot_params = PHYS_OFFSET + 0x00000100, | ||
423 | .fixup = realview_pbx_fixup, | 397 | .fixup = realview_pbx_fixup, |
424 | .map_io = realview_pbx_map_io, | 398 | .map_io = realview_pbx_map_io, |
399 | .init_early = realview_init_early, | ||
425 | .init_irq = gic_init_irq, | 400 | .init_irq = gic_init_irq, |
426 | .timer = &realview_pbx_timer, | 401 | .timer = &realview_pbx_timer, |
427 | .init_machine = realview_pbx_init, | 402 | .init_machine = realview_pbx_init, |