Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
[pandora-kernel.git] / arch / arm / mach-realview / realview_eb.c
index 7d857d3..422ccd7 100644 (file)
@@ -31,8 +31,8 @@
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
+#include <asm/pmu.h>
 #include <asm/hardware/gic.h>
-#include <asm/hardware/icst307.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/localtimer.h>
 
@@ -44,7 +44,6 @@
 #include <mach/irqs.h>
 
 #include "core.h"
-#include "clock.h"
 
 static struct map_desc realview_eb_io_desc[] __initdata = {
        {
@@ -294,6 +293,36 @@ static struct resource realview_eb_isp1761_resources[] = {
        },
 };
 
+static struct resource pmu_resources[] = {
+       [0] = {
+               .start          = IRQ_EB11MP_PMU_CPU0,
+               .end            = IRQ_EB11MP_PMU_CPU0,
+               .flags          = IORESOURCE_IRQ,
+       },
+       [1] = {
+               .start          = IRQ_EB11MP_PMU_CPU1,
+               .end            = IRQ_EB11MP_PMU_CPU1,
+               .flags          = IORESOURCE_IRQ,
+       },
+       [2] = {
+               .start          = IRQ_EB11MP_PMU_CPU2,
+               .end            = IRQ_EB11MP_PMU_CPU2,
+               .flags          = IORESOURCE_IRQ,
+       },
+       [3] = {
+               .start          = IRQ_EB11MP_PMU_CPU3,
+               .end            = IRQ_EB11MP_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 __init gic_init_irq(void)
 {
        if (core_tile_eb11mp() || core_tile_a9mp()) {
@@ -407,6 +436,7 @@ static void __init realview_eb_init(void)
                 * Bits:  .... ...0 0111 1001 0000 .... .... .... */
                l2x0_init(__io_address(REALVIEW_EB11MP_L220_BASE), 0x00790000, 0xfe000fff);
 #endif
+               platform_device_register(&pmu_device);
        }
 
        realview_flash_register(&realview_eb_flash_resource, 1);