]> git.baikalelectronics.ru Git - kernel.git/commit
arm-cci: Abstract out the PMU counter details
authorSuzuki K. Poulose <suzuki.poulose@arm.com>
Tue, 26 May 2015 09:53:12 +0000 (10:53 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 29 May 2015 14:43:49 +0000 (16:43 +0200)
commit56b3de8d00ba1cc286522798b545ae0ebb118e3a
tree56a32de739f28fc06c2fb5150aadbe0588afad95
parent98b1547e475cda5dc102199ddd0927655c94a2a3
arm-cci: Abstract out the PMU counter details

Adds the PMU model specific counters to the PMU model
abstraction to make it easier to add a new PMU.

The patch cleans up the naming convention used all over
the code.
e.g, CCI_PMU_MAX_HW_EVENTS => maximum number of events that
can be counted at any time, which is in fact the maximum
number of counters available.

Change all such namings to use 'counters' instead of events.

This patch also abstracts the following:

1) Size of a PMU event counter area.
2) Maximum number of programmable counters supported by the PMU model
3) Number of counters which counts fixed events (e.g, cycle
  counter on CCI-400).

Also changes some of the static allocation of the data
structures to dynamic, to accommodate the number of events
supported by a PMU.

Gets rid ofthe CCI_PMU_* defines for the model. All such
data should be accessed via the model abstraction.

Limits the number of counters to the maximum supported
by the 'model'.

Cc: Punit Agrawal <punit.agrawal@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
Acked-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/bus/arm-cci.c