[ARM] tegra: Add pmu to common devices
authorColin Cross <ccross@google.com>
Sun, 22 Aug 2010 01:21:23 +0000 (18:21 -0700)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:27:42 +0000 (16:27 -0700)
Originally fixed by Will Deacon.

Change-Id: I504f8109bedd1eea4bf637395913726a98eb6bb8
Signed-off-by: Colin Cross <ccross@google.com>
arch/arm/mach-tegra/devices.c
arch/arm/mach-tegra/devices.h

index 36a9a4864c0a17dcfd370e4c196d5ad956abe930..4e84e7dcea5dfdd441d79a7eb7de82c12ac635ec 100644 (file)
@@ -1,4 +1,4 @@
-/*
+       /*
  * arch/arm/mach-tegra/devices.c
  *
  * Copyright (C) 2010 Google, Inc.
@@ -23,6 +23,7 @@
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/fsl_devices.h>
+#include <asm/pmu.h>
 #include <mach/irqs.h>
 #include <mach/iomap.h>
 #include <mach/dma.h>
@@ -492,3 +493,23 @@ struct platform_device tegra_gart_device = {
        .num_resources  = ARRAY_SIZE(tegra_gart_resources),
        .resource       = tegra_gart_resources
 };
+
+static struct resource pmu_resources[] = {
+       [0] = {
+               .start  = INT_CPU0_PMU_INTR,
+               .end    = INT_CPU0_PMU_INTR,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [1] = {
+               .start  = INT_CPU1_PMU_INTR,
+               .end    = INT_CPU1_PMU_INTR,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device pmu_device = {
+       .name           = "arm-pmu",
+       .id             = ARM_PMU_DEVICE_CPU,
+       .num_resources  = ARRAY_SIZE(pmu_resources),
+       .resource       = pmu_resources,
+};
index 2e63e0fb36390ac93f6e95bae7071274d5440e4a..7088eb9612653058ac05e9806de17072f62cb0b6 100644 (file)
@@ -43,5 +43,5 @@ extern struct platform_device tegra_ehci3_device;
 extern struct platform_device tegra_i2s_device1;
 extern struct platform_device tegra_i2s_device2;
 extern struct platform_device tegra_gart_device;
-
+extern struct platform_device pmu_device;
 #endif