diff options
author | Will Deacon <will.deacon@arm.com> | 2010-04-15 05:16:26 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-02 04:35:40 -0400 |
commit | f417cbad7394fdccec850d13d7d5621516d693ce (patch) | |
tree | 78a14c7f605ee810efa2f3ccd29841c98ecdd8f3 /arch/arm/mach-realview/realview_pbx.c | |
parent | 59ac59f6f1432aa9417d2592bdfd17c99804dd66 (diff) |
ARM: 6057/1: Realview: register PMU IRQs during board initialisation
This patch updates the initialisation routines for the Realview boards
and the Versatile Express board [ca9x4 tile] so that they register their
PMU IRQs with the PMU framework in the Kernel.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-realview/realview_pbx.c')
-rw-r--r-- | arch/arm/mach-realview/realview_pbx.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index d94857eb0690..a235ba30996b 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
30 | #include <asm/leds.h> | 30 | #include <asm/leds.h> |
31 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
32 | #include <asm/pmu.h> | ||
32 | #include <asm/smp_twd.h> | 33 | #include <asm/smp_twd.h> |
33 | #include <asm/hardware/gic.h> | 34 | #include <asm/hardware/gic.h> |
34 | #include <asm/hardware/cache-l2x0.h> | 35 | #include <asm/hardware/cache-l2x0.h> |
@@ -270,6 +271,36 @@ static struct resource realview_pbx_isp1761_resources[] = { | |||
270 | }, | 271 | }, |
271 | }; | 272 | }; |
272 | 273 | ||
274 | static struct resource pmu_resources[] = { | ||
275 | [0] = { | ||
276 | .start = IRQ_PBX_PMU_CPU0, | ||
277 | .end = IRQ_PBX_PMU_CPU0, | ||
278 | .flags = IORESOURCE_IRQ, | ||
279 | }, | ||
280 | [1] = { | ||
281 | .start = IRQ_PBX_PMU_CPU1, | ||
282 | .end = IRQ_PBX_PMU_CPU1, | ||
283 | .flags = IORESOURCE_IRQ, | ||
284 | }, | ||
285 | [2] = { | ||
286 | .start = IRQ_PBX_PMU_CPU2, | ||
287 | .end = IRQ_PBX_PMU_CPU2, | ||
288 | .flags = IORESOURCE_IRQ, | ||
289 | }, | ||
290 | [3] = { | ||
291 | .start = IRQ_PBX_PMU_CPU3, | ||
292 | .end = IRQ_PBX_PMU_CPU3, | ||
293 | .flags = IORESOURCE_IRQ, | ||
294 | }, | ||
295 | }; | ||
296 | |||
297 | static struct platform_device pmu_device = { | ||
298 | .name = "arm-pmu", | ||
299 | .id = ARM_PMU_DEVICE_CPU, | ||
300 | .num_resources = ARRAY_SIZE(pmu_resources), | ||
301 | .resource = pmu_resources, | ||
302 | }; | ||
303 | |||
273 | static void __init gic_init_irq(void) | 304 | static void __init gic_init_irq(void) |
274 | { | 305 | { |
275 | /* ARM PBX on-board GIC */ | 306 | /* ARM PBX on-board GIC */ |
@@ -354,6 +385,7 @@ static void __init realview_pbx_init(void) | |||
354 | /* 16KB way size, 8-way associativity, parity disabled | 385 | /* 16KB way size, 8-way associativity, parity disabled |
355 | * Bits: .. 0 0 0 0 1 00 1 0 1 001 0 000 0 .... .... .... */ | 386 | * Bits: .. 0 0 0 0 1 00 1 0 1 001 0 000 0 .... .... .... */ |
356 | l2x0_init(l2x0_base, 0x02520000, 0xc0000fff); | 387 | l2x0_init(l2x0_base, 0x02520000, 0xc0000fff); |
388 | platform_device_register(&pmu_device); | ||
357 | } | 389 | } |
358 | #endif | 390 | #endif |
359 | 391 | ||