aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2011-01-21 03:19:05 -0500
committerLinus Walleij <linus.walleij@linaro.org>2011-03-14 09:05:06 -0400
commitdf93f1f4eeb02529c13d1f6be832ab6ff7cd8222 (patch)
tree2e88d11c80895953bdd6e68f7bdccc856c8cf035 /arch/arm/mach-ux500
parent8688a1a8637c6b833b9b70148809db4538352d2e (diff)
mach-ux500: add DB5500 PMU resources
This adds the PMU resources necessary to get perf working with the DB5500 ASIC. Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/cpu-db5500.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c
index af04e0891a78..38a01c361263 100644
--- a/arch/arm/mach-ux500/cpu-db5500.c
+++ b/arch/arm/mach-ux500/cpu-db5500.c
@@ -11,6 +11,7 @@
11#include <linux/irq.h> 11#include <linux/irq.h>
12 12
13#include <asm/mach/map.h> 13#include <asm/mach/map.h>
14#include <asm/pmu.h>
14 15
15#include <plat/gpio.h> 16#include <plat/gpio.h>
16 17
@@ -43,6 +44,26 @@ static struct map_desc u5500_io_desc[] __initdata = {
43 __IO_DEV_DESC(U5500_PRCMU_BASE, SZ_4K), 44 __IO_DEV_DESC(U5500_PRCMU_BASE, SZ_4K),
44}; 45};
45 46
47static struct resource db5500_pmu_resources[] = {
48 [0] = {
49 .start = IRQ_DB5500_PMU0,
50 .end = IRQ_DB5500_PMU0,
51 .flags = IORESOURCE_IRQ,
52 },
53 [1] = {
54 .start = IRQ_DB5500_PMU1,
55 .end = IRQ_DB5500_PMU1,
56 .flags = IORESOURCE_IRQ,
57 },
58};
59
60static struct platform_device db5500_pmu_device = {
61 .name = "arm-pmu",
62 .id = ARM_PMU_DEVICE_CPU,
63 .num_resources = ARRAY_SIZE(db5500_pmu_resources),
64 .resource = db5500_pmu_resources,
65};
66
46static struct resource mbox0_resources[] = { 67static struct resource mbox0_resources[] = {
47 { 68 {
48 .name = "mbox_peer", 69 .name = "mbox_peer",
@@ -127,7 +148,8 @@ static struct platform_device mbox2_device = {
127 .num_resources = ARRAY_SIZE(mbox2_resources), 148 .num_resources = ARRAY_SIZE(mbox2_resources),
128}; 149};
129 150
130static struct platform_device *u5500_platform_devs[] __initdata = { 151static struct platform_device *db5500_platform_devs[] __initdata = {
152 &db5500_pmu_device,
131 &mbox0_device, 153 &mbox0_device,
132 &mbox1_device, 154 &mbox1_device,
133 &mbox2_device, 155 &mbox2_device,
@@ -172,6 +194,6 @@ void __init u5500_init_devices(void)
172 db5500_dma_init(); 194 db5500_dma_init();
173 db5500_add_rtc(); 195 db5500_add_rtc();
174 196
175 platform_add_devices(u5500_platform_devs, 197 platform_add_devices(db5500_platform_devs,
176 ARRAY_SIZE(u5500_platform_devs)); 198 ARRAY_SIZE(db5500_platform_devs));
177} 199}