aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2010-04-09 08:57:02 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-04-29 13:03:49 -0400
commitde4338f40e48da3b604219909a1d4aa7aa60870f (patch)
treeb653ddfb75f1b3dd7f96637e0d0e9b1272c0c701 /arch
parentcc761beda2426cf663a649b905b6643673ff7b30 (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/Makefile2
-rw-r--r--arch/arm/plat-iop/pmu.c40
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
13obj-$(CONFIG_ARCH_IOP32X) += io.o 13obj-$(CONFIG_ARCH_IOP32X) += io.o
14obj-$(CONFIG_ARCH_IOP32X) += cp6.o 14obj-$(CONFIG_ARCH_IOP32X) += cp6.o
15obj-$(CONFIG_ARCH_IOP32X) += adma.o 15obj-$(CONFIG_ARCH_IOP32X) += adma.o
16obj-$(CONFIG_ARCH_IOP32X) += pmu.o
16 17
17# IOP33X 18# IOP33X
18obj-$(CONFIG_ARCH_IOP33X) += gpio.o 19obj-$(CONFIG_ARCH_IOP33X) += gpio.o
@@ -23,6 +24,7 @@ obj-$(CONFIG_ARCH_IOP33X) += time.o
23obj-$(CONFIG_ARCH_IOP33X) += io.o 24obj-$(CONFIG_ARCH_IOP33X) += io.o
24obj-$(CONFIG_ARCH_IOP33X) += cp6.o 25obj-$(CONFIG_ARCH_IOP33X) += cp6.o
25obj-$(CONFIG_ARCH_IOP33X) += adma.o 26obj-$(CONFIG_ARCH_IOP33X) += adma.o
27obj-$(CONFIG_ARCH_IOP33X) += pmu.o
26 28
27# IOP13XX 29# IOP13XX
28obj-$(CONFIG_ARCH_IOP13XX) += cp6.o 30obj-$(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
15static 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
27static 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
34static int __init iop3xx_pmu_init(void)
35{
36 platform_device_register(&pmu_device);
37 return 0;
38}
39
40arch_initcall(iop3xx_pmu_init);