diff options
author | Will Deacon <will.deacon@arm.com> | 2010-04-15 10:16:26 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-02 09:35:40 +0100 |
commit | f417cbad7394fdccec850d13d7d5621516d693ce (patch) | |
tree | 78a14c7f605ee810efa2f3ccd29841c98ecdd8f3 /arch/arm/mach-vexpress/ct-ca9x4.c | |
parent | 59ac59f6f1432aa9417d2592bdfd17c99804dd66 (diff) | |
download | op-kernel-dev-f417cbad7394fdccec850d13d7d5621516d693ce.zip op-kernel-dev-f417cbad7394fdccec850d13d7d5621516d693ce.tar.gz |
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-vexpress/ct-ca9x4.c')
-rw-r--r-- | arch/arm/mach-vexpress/ct-ca9x4.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index 5a0449c..e6f7303 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c @@ -4,6 +4,7 @@ #include <linux/init.h> #include <linux/device.h> #include <linux/dma-mapping.h> +#include <linux/platform_device.h> #include <linux/amba/bus.h> #include <linux/amba/clcd.h> @@ -12,6 +13,7 @@ #include <asm/hardware/cache-l2x0.h> #include <asm/hardware/gic.h> #include <asm/mach-types.h> +#include <asm/pmu.h> #include <mach/clkdev.h> #include <mach/ct-ca9x4.h> @@ -186,6 +188,36 @@ static struct clk_lookup lookups[] = { }, }; +static struct resource pmu_resources[] = { + [0] = { + .start = IRQ_CT_CA9X4_PMU_CPU0, + .end = IRQ_CT_CA9X4_PMU_CPU0, + .flags = IORESOURCE_IRQ, + }, + [1] = { + .start = IRQ_CT_CA9X4_PMU_CPU1, + .end = IRQ_CT_CA9X4_PMU_CPU1, + .flags = IORESOURCE_IRQ, + }, + [2] = { + .start = IRQ_CT_CA9X4_PMU_CPU2, + .end = IRQ_CT_CA9X4_PMU_CPU2, + .flags = IORESOURCE_IRQ, + }, + [3] = { + .start = IRQ_CT_CA9X4_PMU_CPU3, + .end = IRQ_CT_CA9X4_PMU_CPU3, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device pmu_device = { + .name = "arm-pmu", + .id = ARM_PMU_DEVICE_CPU, + .num_resources = ARRAY_SIZE(pmu_resources), + .resource = pmu_resources, +}; + static void ct_ca9x4_init(void) { int i; @@ -198,6 +230,8 @@ static void ct_ca9x4_init(void) for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++) amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource); + + platform_device_register(&pmu_device); } MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4") |