]> git.baikalelectronics.ru Git - kernel.git/commit
arm-cci: Abstract handling for CCI events
authorSuzuki K. Poulose <suzuki.poulose@arm.com>
Tue, 26 May 2015 09:53:13 +0000 (10:53 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 29 May 2015 14:43:50 +0000 (16:43 +0200)
commitfe6b5de563d067abf3f986d73b4ef9cd7790eee1
tree1b8bae4e4fc3c4a1dfca6389729991bc5a0f2375
parent56b3de8d00ba1cc286522798b545ae0ebb118e3a
arm-cci: Abstract handling for CCI events

Given that each CCI has different set of interfaces and
its associated events, it is good to abstract the validation of the
event codes to make it easier to add support for a new CCI model.

This patch also abstracts the mapping of a given event to a counter,
as there are some special counters for certain specific events.

We assume that the fixed hardware counters are always at the beginning,
so that we can use cci_model->fixed_hw_events as an upper bound to given
idx to check if we need to program the counter for an event.

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