]> Pileus Git - ~andy/linux/commitdiff
ARM: pmu: remove arm_pmu_type enumeration
authorSudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
Thu, 19 Jul 2012 08:50:21 +0000 (09:50 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 23 Aug 2012 10:35:51 +0000 (11:35 +0100)
The arm_pmu_type enumeration was initially introduced to identify
different PMU types in the system, the usual one being that on the CPU
(ARM_PMU_DEVICE_CPU). With the removal of the PMU reservation code and
the introduction of devicetree bindings for the CPU PMU, the enumeration
is no longer required.

This patch removes the enumeration and updates the various CPU PMU
platform devices so that they no longer pass an .id field referring
to identify the PMU type.

Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Pawel Moll <pawel.moll@arm.com>
Acked-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jiandong Zheng <jdzheng@broadcom.com>
Signed-off-by: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
[will: cosmetic edits and actual removal of the enum type]
Signed-off-by: Will Deacon <will.deacon@arm.com>
14 files changed:
arch/arm/include/asm/pmu.h
arch/arm/mach-bcmring/arch.c
arch/arm/mach-omap2/devices.c
arch/arm/mach-pxa/devices.c
arch/arm/mach-realview/realview_eb.c
arch/arm/mach-realview/realview_pb1176.c
arch/arm/mach-realview/realview_pb11mp.c
arch/arm/mach-realview/realview_pba8.c
arch/arm/mach-realview/realview_pbx.c
arch/arm/mach-tegra/devices.c
arch/arm/mach-ux500/cpu-db8500.c
arch/arm/mach-vexpress/ct-ca9x4.c
arch/arm/plat-iop/pmu.c
arch/arm/plat-samsung/devs.c

index 05e0401d7697742efdbd3d33a1d19d574f3c1948..fbec73a0ee7662587b24529fa794347b28cd8dbf 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/perf_event.h>
 
-/*
- * Types of PMUs that can be accessed directly and require mutual
- * exclusion between profiling tools.
- */
-enum arm_pmu_type {
-       ARM_PMU_DEVICE_CPU      = 0,
-       ARM_NUM_PMU_DEVICES,
-};
-
 /*
  * struct arm_pmu_platdata - ARM PMU platform data
  *
@@ -73,7 +64,6 @@ struct pmu_hw_events {
 
 struct arm_pmu {
        struct pmu      pmu;
-       enum arm_pmu_type type;
        cpumask_t       active_irqs;
        char            *name;
        irqreturn_t     (*handle_irq)(int irq_num, void *dev);
index 45c97b1ee9b1d59ba923a69b50e94337b48da993..76e795323569ee61ec164ed8a29138c5f392b9d9 100644 (file)
@@ -29,7 +29,6 @@
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/mach/time.h>
-#include <asm/pmu.h>
 
 #include <asm/mach/arch.h>
 #include <mach/dma.h>
@@ -116,7 +115,7 @@ static struct resource pmu_resource = {
 
 static struct platform_device pmu_device = {
        .name           = "arm-pmu",
-       .id             = ARM_PMU_DEVICE_CPU,
+       .id             = -1,
        .resource       = &pmu_resource,
        .num_resources  = 1,
 };
index c00c68961bb848d16a68802003a4ee6402cf4710..02b9478b786f0b1e42c886a7196b3b3e5fd441cb 100644 (file)
@@ -23,7 +23,6 @@
 #include <mach/irqs.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
-#include <asm/pmu.h>
 
 #include "iomap.h"
 #include <plat/board.h>
@@ -448,7 +447,7 @@ static struct resource omap3_pmu_resource = {
 
 static struct platform_device omap_pmu_device = {
        .name           = "arm-pmu",
-       .id             = ARM_PMU_DEVICE_CPU,
+       .id             = -1,
        .num_resources  = 1,
 };
 
index 166eee5b8a70fe8f4bc555543ea8027564ee0392..c1f3b1279d97bc588ba7d9a44d18b45cc63cde80 100644 (file)
@@ -6,7 +6,6 @@
 #include <linux/spi/pxa2xx_spi.h>
 #include <linux/i2c/pxa-i2c.h>
 
-#include <asm/pmu.h>
 #include <mach/udc.h>
 #include <mach/pxa3xx-u2d.h>
 #include <mach/pxafb.h>
@@ -42,7 +41,7 @@ static struct resource pxa_resource_pmu = {
 
 struct platform_device pxa_device_pmu = {
        .name           = "arm-pmu",
-       .id             = ARM_PMU_DEVICE_CPU,
+       .id             = -1,
        .resource       = &pxa_resource_pmu,
        .num_resources  = 1,
 };
index baf382c5e77601957b2ef8982ccdd61552f9b2f2..d7a6e9cebba4792d9306091bdf8e5c7043a69135 100644 (file)
@@ -32,7 +32,6 @@
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
-#include <asm/pmu.h>
 #include <asm/pgtable.h>
 #include <asm/hardware/gic.h>
 #include <asm/hardware/cache-l2x0.h>
@@ -297,7 +296,7 @@ static struct resource pmu_resources[] = {
 
 static struct platform_device pmu_device = {
        .name                   = "arm-pmu",
-       .id                     = ARM_PMU_DEVICE_CPU,
+       .id                     = -1,
        .num_resources          = ARRAY_SIZE(pmu_resources),
        .resource               = pmu_resources,
 };
index b1d7cafa1a6d2e295c2f95529b1d556df4b85db1..361f898884c890ca2769267970b412dd53dce25f 100644 (file)
@@ -34,7 +34,6 @@
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
-#include <asm/pmu.h>
 #include <asm/pgtable.h>
 #include <asm/hardware/gic.h>
 #include <asm/hardware/cache-l2x0.h>
@@ -280,7 +279,7 @@ static struct resource pmu_resource = {
 
 static struct platform_device pmu_device = {
        .name                   = "arm-pmu",
-       .id                     = ARM_PMU_DEVICE_CPU,
+       .id                     = -1,
        .num_resources          = 1,
        .resource               = &pmu_resource,
 };
index a98c536e3327afa9823a2b29ffd081258be2ae5a..c56bc8d4d11ba2730a67d50a775b9c706b397f14 100644 (file)
@@ -32,7 +32,6 @@
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
-#include <asm/pmu.h>
 #include <asm/pgtable.h>
 #include <asm/hardware/gic.h>
 #include <asm/hardware/cache-l2x0.h>
@@ -263,7 +262,7 @@ static struct resource pmu_resources[] = {
 
 static struct platform_device pmu_device = {
        .name                   = "arm-pmu",
-       .id                     = ARM_PMU_DEVICE_CPU,
+       .id                     = -1,
        .num_resources          = ARRAY_SIZE(pmu_resources),
        .resource               = pmu_resources,
 };
index 59650174e6ed39e9c3bc9e44441beb48b22a4214..0409375824531e883fb2916ec9b2c888f24aa8e4 100644 (file)
@@ -31,7 +31,6 @@
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
-#include <asm/pmu.h>
 #include <asm/pgtable.h>
 #include <asm/hardware/gic.h>
 
@@ -241,7 +240,7 @@ static struct resource pmu_resource = {
 
 static struct platform_device pmu_device = {
        .name                   = "arm-pmu",
-       .id                     = ARM_PMU_DEVICE_CPU,
+       .id                     = -1,
        .num_resources          = 1,
        .resource               = &pmu_resource,
 };
index 3f2f605624e95270fd1039e64a3a0a2d2180cd06..97885dc11e8cb89575c96cc69fb07f7f9bb40dd9 100644 (file)
@@ -30,7 +30,6 @@
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
-#include <asm/pmu.h>
 #include <asm/smp_twd.h>
 #include <asm/pgtable.h>
 #include <asm/hardware/gic.h>
@@ -280,7 +279,7 @@ static struct resource pmu_resources[] = {
 
 static struct platform_device pmu_device = {
        .name                   = "arm-pmu",
-       .id                     = ARM_PMU_DEVICE_CPU,
+       .id                     = -1,
        .num_resources          = ARRAY_SIZE(pmu_resources),
        .resource               = pmu_resources,
 };
index c70e65ffa36ba8a91e16b372c8c616abd4414c20..61e9603744a778dfa53e25084e1d04449def7e3b 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/fsl_devices.h>
 #include <linux/serial_8250.h>
 #include <linux/i2c-tegra.h>
-#include <asm/pmu.h>
 #include <mach/irqs.h>
 #include <mach/iomap.h>
 #include <mach/dma.h>
@@ -516,7 +515,7 @@ static struct resource tegra_pmu_resources[] = {
 
 struct platform_device tegra_pmu_device = {
        .name           = "arm-pmu",
-       .id             = ARM_PMU_DEVICE_CPU,
+       .id             = -1,
        .num_resources  = ARRAY_SIZE(tegra_pmu_resources),
        .resource       = tegra_pmu_resources,
 };
index db3c52d56ca46ad54bddbcaaa2f48d7c64f025a6..3ee761d3a86f7d8259f6a6f35925c08942c53fac 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/mfd/abx500/ab8500.h>
 
 #include <asm/mach/map.h>
-#include <asm/pmu.h>
 #include <plat/gpio-nomadik.h>
 #include <mach/hardware.h>
 #include <mach/setup.h>
@@ -122,7 +121,7 @@ struct arm_pmu_platdata db8500_pmu_platdata = {
 
 static struct platform_device db8500_pmu_device = {
        .name                   = "arm-pmu",
-       .id                     = ARM_PMU_DEVICE_CPU,
+       .id                     = -1,
        .num_resources          = ARRAY_SIZE(db8500_pmu_resources),
        .resource               = db8500_pmu_resources,
        .dev.platform_data      = &db8500_pmu_platdata,
index 61c492403b05f46957787a7836ef12a0eee44695..e4073a60a86457968a871fb8ad3096c1970f892c 100644 (file)
@@ -13,7 +13,6 @@
 #include <asm/hardware/arm_timer.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/hardware/gic.h>
-#include <asm/pmu.h>
 #include <asm/smp_scu.h>
 #include <asm/smp_twd.h>
 
@@ -144,7 +143,7 @@ static struct resource pmu_resources[] = {
 
 static struct platform_device pmu_device = {
        .name           = "arm-pmu",
-       .id             = ARM_PMU_DEVICE_CPU,
+       .id             = -1,
        .num_resources  = ARRAY_SIZE(pmu_resources),
        .resource       = pmu_resources,
 };
index a2024b8685a15a37a0141132bcc49ce8f80aa599..ad9f9744a82d12b22e4c8d8407e686867b79f351 100644 (file)
@@ -9,7 +9,6 @@
  */
 
 #include <linux/platform_device.h>
-#include <asm/pmu.h>
 #include <mach/irqs.h>
 
 static struct resource pmu_resource = {
@@ -26,7 +25,7 @@ static struct resource pmu_resource = {
 
 static struct platform_device pmu_device = {
        .name           = "arm-pmu",
-       .id             = ARM_PMU_DEVICE_CPU,
+       .id             = -1,
        .resource       = &pmu_resource,
        .num_resources  = 1,
 };
index 74e31ce355388bd7c2062b35fb30e09ca085b3f5..8154fab70de8404a5ea89f71b8f6f20e0056c9ff 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/platform_data/s3c-hsotg.h>
 
 #include <asm/irq.h>
-#include <asm/pmu.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
@@ -1105,7 +1104,7 @@ static struct resource s5p_pmu_resource[] = {
 
 static struct platform_device s5p_device_pmu = {
        .name           = "arm-pmu",
-       .id             = ARM_PMU_DEVICE_CPU,
+       .id             = -1,
        .num_resources  = ARRAY_SIZE(s5p_pmu_resource),
        .resource       = s5p_pmu_resource,
 };