diff options
author | Will Deacon <will.deacon@arm.com> | 2010-04-09 08:57:02 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-04-29 13:03:49 -0400 |
commit | de4338f40e48da3b604219909a1d4aa7aa60870f (patch) | |
tree | b653ddfb75f1b3dd7f96637e0d0e9b1272c0c701 /arch | |
parent | cc761beda2426cf663a649b905b6643673ff7b30 (diff) |
ARM: 6048/1: ARM: iop3xx: register PMU IRQs during board initialisation
This patch adds an initcall for the iop3xx platforms so that they
register their PMU IRQS with the PMU framework in the Kernel.
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-iop/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/plat-iop/pmu.c | 40 |
2 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/plat-iop/Makefile b/arch/arm/plat-iop/Makefile index 36bff0325959..69b09c1cec8b 100644 --- a/arch/arm/plat-iop/Makefile +++ b/arch/arm/plat-iop/Makefile | |||
@@ -13,6 +13,7 @@ obj-$(CONFIG_ARCH_IOP32X) += time.o | |||
13 | obj-$(CONFIG_ARCH_IOP32X) += io.o | 13 | obj-$(CONFIG_ARCH_IOP32X) += io.o |
14 | obj-$(CONFIG_ARCH_IOP32X) += cp6.o | 14 | obj-$(CONFIG_ARCH_IOP32X) += cp6.o |
15 | obj-$(CONFIG_ARCH_IOP32X) += adma.o | 15 | obj-$(CONFIG_ARCH_IOP32X) += adma.o |
16 | obj-$(CONFIG_ARCH_IOP32X) += pmu.o | ||
16 | 17 | ||
17 | # IOP33X | 18 | # IOP33X |
18 | obj-$(CONFIG_ARCH_IOP33X) += gpio.o | 19 | obj-$(CONFIG_ARCH_IOP33X) += gpio.o |
@@ -23,6 +24,7 @@ obj-$(CONFIG_ARCH_IOP33X) += time.o | |||
23 | obj-$(CONFIG_ARCH_IOP33X) += io.o | 24 | obj-$(CONFIG_ARCH_IOP33X) += io.o |
24 | obj-$(CONFIG_ARCH_IOP33X) += cp6.o | 25 | obj-$(CONFIG_ARCH_IOP33X) += cp6.o |
25 | obj-$(CONFIG_ARCH_IOP33X) += adma.o | 26 | obj-$(CONFIG_ARCH_IOP33X) += adma.o |
27 | obj-$(CONFIG_ARCH_IOP33X) += pmu.o | ||
26 | 28 | ||
27 | # IOP13XX | 29 | # IOP13XX |
28 | obj-$(CONFIG_ARCH_IOP13XX) += cp6.o | 30 | obj-$(CONFIG_ARCH_IOP13XX) += cp6.o |
diff --git a/arch/arm/plat-iop/pmu.c b/arch/arm/plat-iop/pmu.c new file mode 100644 index 000000000000..a2024b8685a1 --- /dev/null +++ b/arch/arm/plat-iop/pmu.c | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * PMU IRQ registration for the iop3xx xscale PMU families. | ||
3 | * Copyright (C) 2010 Will Deacon, ARM Ltd. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/platform_device.h> | ||
12 | #include <asm/pmu.h> | ||
13 | #include <mach/irqs.h> | ||
14 | |||
15 | static struct resource pmu_resource = { | ||
16 | #ifdef CONFIG_ARCH_IOP32X | ||
17 | .start = IRQ_IOP32X_CORE_PMU, | ||
18 | .end = IRQ_IOP32X_CORE_PMU, | ||
19 | #endif | ||
20 | #ifdef CONFIG_ARCH_IOP33X | ||
21 | .start = IRQ_IOP33X_CORE_PMU, | ||
22 | .end = IRQ_IOP33X_CORE_PMU, | ||
23 | #endif | ||
24 | .flags = IORESOURCE_IRQ, | ||
25 | }; | ||
26 | |||
27 | static struct platform_device pmu_device = { | ||
28 | .name = "arm-pmu", | ||
29 | .id = ARM_PMU_DEVICE_CPU, | ||
30 | .resource = &pmu_resource, | ||
31 | .num_resources = 1, | ||
32 | }; | ||
33 | |||
34 | static int __init iop3xx_pmu_init(void) | ||
35 | { | ||
36 | platform_device_register(&pmu_device); | ||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | arch_initcall(iop3xx_pmu_init); | ||