Commit df3d17e0 authored by Sudeep KarkadaNagesha's avatar Sudeep KarkadaNagesha Committed by Will Deacon

ARM: pmu: remove arm_pmu_type enumeration

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: default avatarJon Hunter <jon-hunter@ti.com>
Acked-by: default avatarKukjin Kim <kgene.kim@samsung.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarJiandong Zheng <jdzheng@broadcom.com>
Signed-off-by: default avatarSudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
[will: cosmetic edits and actual removal of the enum type]
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent f0d1bc47
...@@ -15,15 +15,6 @@ ...@@ -15,15 +15,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/perf_event.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 * struct arm_pmu_platdata - ARM PMU platform data
* *
...@@ -73,7 +64,6 @@ struct pmu_hw_events { ...@@ -73,7 +64,6 @@ struct pmu_hw_events {
struct arm_pmu { struct arm_pmu {
struct pmu pmu; struct pmu pmu;
enum arm_pmu_type type;
cpumask_t active_irqs; cpumask_t active_irqs;
char *name; char *name;
irqreturn_t (*handle_irq)(int irq_num, void *dev); irqreturn_t (*handle_irq)(int irq_num, void *dev);
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <asm/pmu.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <mach/dma.h> #include <mach/dma.h>
...@@ -116,7 +115,7 @@ static struct resource pmu_resource = { ...@@ -116,7 +115,7 @@ static struct resource pmu_resource = {
static struct platform_device pmu_device = { static struct platform_device pmu_device = {
.name = "arm-pmu", .name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU, .id = -1,
.resource = &pmu_resource, .resource = &pmu_resource,
.num_resources = 1, .num_resources = 1,
}; };
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <mach/irqs.h> #include <mach/irqs.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/pmu.h>
#include "iomap.h" #include "iomap.h"
#include <plat/board.h> #include <plat/board.h>
...@@ -448,7 +447,7 @@ static struct resource omap3_pmu_resource = { ...@@ -448,7 +447,7 @@ static struct resource omap3_pmu_resource = {
static struct platform_device omap_pmu_device = { static struct platform_device omap_pmu_device = {
.name = "arm-pmu", .name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU, .id = -1,
.num_resources = 1, .num_resources = 1,
}; };
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <linux/spi/pxa2xx_spi.h> #include <linux/spi/pxa2xx_spi.h>
#include <linux/i2c/pxa-i2c.h> #include <linux/i2c/pxa-i2c.h>
#include <asm/pmu.h>
#include <mach/udc.h> #include <mach/udc.h>
#include <mach/pxa3xx-u2d.h> #include <mach/pxa3xx-u2d.h>
#include <mach/pxafb.h> #include <mach/pxafb.h>
...@@ -42,7 +41,7 @@ static struct resource pxa_resource_pmu = { ...@@ -42,7 +41,7 @@ static struct resource pxa_resource_pmu = {
struct platform_device pxa_device_pmu = { struct platform_device pxa_device_pmu = {
.name = "arm-pmu", .name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU, .id = -1,
.resource = &pxa_resource_pmu, .resource = &pxa_resource_pmu,
.num_resources = 1, .num_resources = 1,
}; };
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/pmu.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
...@@ -297,7 +296,7 @@ static struct resource pmu_resources[] = { ...@@ -297,7 +296,7 @@ static struct resource pmu_resources[] = {
static struct platform_device pmu_device = { static struct platform_device pmu_device = {
.name = "arm-pmu", .name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU, .id = -1,
.num_resources = ARRAY_SIZE(pmu_resources), .num_resources = ARRAY_SIZE(pmu_resources),
.resource = pmu_resources, .resource = pmu_resources,
}; };
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/pmu.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
...@@ -280,7 +279,7 @@ static struct resource pmu_resource = { ...@@ -280,7 +279,7 @@ static struct resource pmu_resource = {
static struct platform_device pmu_device = { static struct platform_device pmu_device = {
.name = "arm-pmu", .name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU, .id = -1,
.num_resources = 1, .num_resources = 1,
.resource = &pmu_resource, .resource = &pmu_resource,
}; };
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/pmu.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
...@@ -263,7 +262,7 @@ static struct resource pmu_resources[] = { ...@@ -263,7 +262,7 @@ static struct resource pmu_resources[] = {
static struct platform_device pmu_device = { static struct platform_device pmu_device = {
.name = "arm-pmu", .name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU, .id = -1,
.num_resources = ARRAY_SIZE(pmu_resources), .num_resources = ARRAY_SIZE(pmu_resources),
.resource = pmu_resources, .resource = pmu_resources,
}; };
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/pmu.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
...@@ -241,7 +240,7 @@ static struct resource pmu_resource = { ...@@ -241,7 +240,7 @@ static struct resource pmu_resource = {
static struct platform_device pmu_device = { static struct platform_device pmu_device = {
.name = "arm-pmu", .name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU, .id = -1,
.num_resources = 1, .num_resources = 1,
.resource = &pmu_resource, .resource = &pmu_resource,
}; };
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/pmu.h>
#include <asm/smp_twd.h> #include <asm/smp_twd.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
...@@ -280,7 +279,7 @@ static struct resource pmu_resources[] = { ...@@ -280,7 +279,7 @@ static struct resource pmu_resources[] = {
static struct platform_device pmu_device = { static struct platform_device pmu_device = {
.name = "arm-pmu", .name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU, .id = -1,
.num_resources = ARRAY_SIZE(pmu_resources), .num_resources = ARRAY_SIZE(pmu_resources),
.resource = pmu_resources, .resource = pmu_resources,
}; };
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <linux/fsl_devices.h> #include <linux/fsl_devices.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/i2c-tegra.h> #include <linux/i2c-tegra.h>
#include <asm/pmu.h>
#include <mach/irqs.h> #include <mach/irqs.h>
#include <mach/iomap.h> #include <mach/iomap.h>
#include <mach/dma.h> #include <mach/dma.h>
...@@ -516,7 +515,7 @@ static struct resource tegra_pmu_resources[] = { ...@@ -516,7 +515,7 @@ static struct resource tegra_pmu_resources[] = {
struct platform_device tegra_pmu_device = { struct platform_device tegra_pmu_device = {
.name = "arm-pmu", .name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU, .id = -1,
.num_resources = ARRAY_SIZE(tegra_pmu_resources), .num_resources = ARRAY_SIZE(tegra_pmu_resources),
.resource = tegra_pmu_resources, .resource = tegra_pmu_resources,
}; };
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <linux/mfd/abx500/ab8500.h> #include <linux/mfd/abx500/ab8500.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/pmu.h>
#include <plat/gpio-nomadik.h> #include <plat/gpio-nomadik.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/setup.h> #include <mach/setup.h>
...@@ -122,7 +121,7 @@ struct arm_pmu_platdata db8500_pmu_platdata = { ...@@ -122,7 +121,7 @@ struct arm_pmu_platdata db8500_pmu_platdata = {
static struct platform_device db8500_pmu_device = { static struct platform_device db8500_pmu_device = {
.name = "arm-pmu", .name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU, .id = -1,
.num_resources = ARRAY_SIZE(db8500_pmu_resources), .num_resources = ARRAY_SIZE(db8500_pmu_resources),
.resource = db8500_pmu_resources, .resource = db8500_pmu_resources,
.dev.platform_data = &db8500_pmu_platdata, .dev.platform_data = &db8500_pmu_platdata,
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <asm/hardware/arm_timer.h> #include <asm/hardware/arm_timer.h>
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
#include <asm/pmu.h>
#include <asm/smp_scu.h> #include <asm/smp_scu.h>
#include <asm/smp_twd.h> #include <asm/smp_twd.h>
...@@ -144,7 +143,7 @@ static struct resource pmu_resources[] = { ...@@ -144,7 +143,7 @@ static struct resource pmu_resources[] = {
static struct platform_device pmu_device = { static struct platform_device pmu_device = {
.name = "arm-pmu", .name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU, .id = -1,
.num_resources = ARRAY_SIZE(pmu_resources), .num_resources = ARRAY_SIZE(pmu_resources),
.resource = pmu_resources, .resource = pmu_resources,
}; };
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
*/ */
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <asm/pmu.h>
#include <mach/irqs.h> #include <mach/irqs.h>
static struct resource pmu_resource = { static struct resource pmu_resource = {
...@@ -26,7 +25,7 @@ static struct resource pmu_resource = { ...@@ -26,7 +25,7 @@ static struct resource pmu_resource = {
static struct platform_device pmu_device = { static struct platform_device pmu_device = {
.name = "arm-pmu", .name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU, .id = -1,
.resource = &pmu_resource, .resource = &pmu_resource,
.num_resources = 1, .num_resources = 1,
}; };
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <linux/platform_data/s3c-hsotg.h> #include <linux/platform_data/s3c-hsotg.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/pmu.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
...@@ -1105,7 +1104,7 @@ static struct resource s5p_pmu_resource[] = { ...@@ -1105,7 +1104,7 @@ static struct resource s5p_pmu_resource[] = {
static struct platform_device s5p_device_pmu = { static struct platform_device s5p_device_pmu = {
.name = "arm-pmu", .name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU, .id = -1,
.num_resources = ARRAY_SIZE(s5p_pmu_resource), .num_resources = ARRAY_SIZE(s5p_pmu_resource),
.resource = s5p_pmu_resource, .resource = s5p_pmu_resource,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment