ARM: shmobile: sh73a0: enable PMU(Performance Monitoring Unit)
authorTetsuyuki Kobayashi <koba@kmckk.co.jp>
Thu, 6 Sep 2012 11:14:06 +0000 (20:14 +0900)
committerSimon Horman <horms@verge.net.au>
Tue, 11 Sep 2012 07:27:25 +0000 (16:27 +0900)
This patch enables PMU(Performance Monitoring Unit) for sh73a0.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
arch/arm/configs/kzm9g_defconfig
arch/arm/mach-shmobile/setup-sh73a0.c

index 2388c86106277dccb08e0c24820a6e4a0a733630..5d0c66708960c7d4f2cf4d20dc31fc205f0c6c88 100644 (file)
@@ -14,6 +14,7 @@ CONFIG_NAMESPACES=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL_SYSCALL=y
 CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
 CONFIG_SLAB=y
 CONFIG_MODULES=y
 CONFIG_MODULE_FORCE_LOAD=y
index d230af656fc9c57418906e7ce3af785b7117ffc1..38ed2ddd32655de26939cb4d6048079ba0ddb63e 100644 (file)
@@ -734,6 +734,26 @@ static struct platform_device mpdma0_device = {
        },
 };
 
+static struct resource pmu_resources[] = {
+       [0] = {
+               .start  = gic_spi(55),
+               .end    = gic_spi(55),
+               .flags  = IORESOURCE_IRQ,
+       },
+       [1] = {
+               .start  = gic_spi(56),
+               .end    = gic_spi(56),
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device pmu_device = {
+       .name           = "arm-pmu",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(pmu_resources),
+       .resource       = pmu_resources,
+};
+
 static struct platform_device *sh73a0_early_devices[] __initdata = {
        &scif0_device,
        &scif1_device,
@@ -757,6 +777,7 @@ static struct platform_device *sh73a0_late_devices[] __initdata = {
        &i2c4_device,
        &dma0_device,
        &mpdma0_device,
+       &pmu_device,
 };
 
 #define SRCR2          0xe61580b0
This page took 0.026741 seconds and 5 git commands to generate.