ARM: 6974/1: pmu: refactor reservation
authorMark Rutland <mark.rutland@arm.com>
Wed, 22 Jun 2011 14:30:51 +0000 (15:30 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 29 Jun 2011 09:27:08 +0000 (10:27 +0100)
commitf12482c9393da2c1f5cb3217f29aa79c653dd980
tree3963f2607ea13feb1d384df5da7727148101d652
parent090ab3ff8ebb842c0f159d34d57d6e51bd94ace1
ARM: 6974/1: pmu: refactor reservation

Currently, PMU platform_device reservation relies on some minor abuse
of the platform_device::id field for determining the type of PMU. This
is problematic for device tree based probing, where the ID cannot be
controlled.

This patch removes reliance on the id field, and depends on each PMU's
platform driver to figure out which type it is. As all PMUs handled by
the current platform_driver name "arm-pmu" are CPU PMUs, this
convention is hardcoded. New PMU types can be supported through the use
of {of,platform}_device_id tables

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/pmu.h
arch/arm/kernel/perf_event.c
arch/arm/kernel/pmu.c