aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-vexpress/ct-ca9x4.c
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2010-04-15 05:16:26 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-05-02 04:35:40 -0400
commitf417cbad7394fdccec850d13d7d5621516d693ce (patch)
tree78a14c7f605ee810efa2f3ccd29841c98ecdd8f3 /arch/arm/mach-vexpress/ct-ca9x4.c
parent59ac59f6f1432aa9417d2592bdfd17c99804dd66 (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-vexpress/ct-ca9x4.c')
-rw-r--r--arch/arm/mach-vexpress/ct-ca9x4.c34
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 5a0449c6f50d..e6f73030d5f0 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -4,6 +4,7 @@
4#include <linux/init.h> 4#include <linux/init.h>
5#include <linux/device.h> 5#include <linux/device.h>
6#include <linux/dma-mapping.h> 6#include <linux/dma-mapping.h>
7#include <linux/platform_device.h>
7#include <linux/amba/bus.h> 8#include <linux/amba/bus.h>
8#include <linux/amba/clcd.h> 9#include <linux/amba/clcd.h>
9 10
@@ -12,6 +13,7 @@
12#include <asm/hardware/cache-l2x0.h> 13#include <asm/hardware/cache-l2x0.h>
13#include <asm/hardware/gic.h> 14#include <asm/hardware/gic.h>
14#include <asm/mach-types.h> 15#include <asm/mach-types.h>
16#include <asm/pmu.h>
15 17
16#include <mach/clkdev.h> 18#include <mach/clkdev.h>
17#include <mach/ct-ca9x4.h> 19#include <mach/ct-ca9x4.h>
@@ -186,6 +188,36 @@ static struct clk_lookup lookups[] = {
186 }, 188 },
187}; 189};
188 190
191static struct resource pmu_resources[] = {
192 [0] = {
193 .start = IRQ_CT_CA9X4_PMU_CPU0,
194 .end = IRQ_CT_CA9X4_PMU_CPU0,
195 .flags = IORESOURCE_IRQ,
196 },
197 [1] = {
198 .start = IRQ_CT_CA9X4_PMU_CPU1,
199 .end = IRQ_CT_CA9X4_PMU_CPU1,
200 .flags = IORESOURCE_IRQ,
201 },
202 [2] = {
203 .start = IRQ_CT_CA9X4_PMU_CPU2,
204 .end = IRQ_CT_CA9X4_PMU_CPU2,
205 .flags = IORESOURCE_IRQ,
206 },
207 [3] = {
208 .start = IRQ_CT_CA9X4_PMU_CPU3,
209 .end = IRQ_CT_CA9X4_PMU_CPU3,
210 .flags = IORESOURCE_IRQ,
211 },
212};
213
214static struct platform_device pmu_device = {
215 .name = "arm-pmu",
216 .id = ARM_PMU_DEVICE_CPU,
217 .num_resources = ARRAY_SIZE(pmu_resources),
218 .resource = pmu_resources,
219};
220
189static void ct_ca9x4_init(void) 221static void ct_ca9x4_init(void)
190{ 222{
191 int i; 223 int i;
@@ -198,6 +230,8 @@ static void ct_ca9x4_init(void)
198 230
199 for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++) 231 for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++)
200 amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource); 232 amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource);
233
234 platform_device_register(&pmu_device);
201} 235}
202 236
203MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4") 237MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4")