summaryrefslogtreecommitdiff
path: root/arch/arm/oprofile/op_model_v6.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/oprofile/op_model_v6.c')
-rw-r--r--arch/arm/oprofile/op_model_v6.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/arm/oprofile/op_model_v6.c b/arch/arm/oprofile/op_model_v6.c
index fe581383d3e2..a8bf2ab6cd0d 100644
--- a/arch/arm/oprofile/op_model_v6.c
+++ b/arch/arm/oprofile/op_model_v6.c
@@ -28,16 +28,21 @@
#include "op_counter.h"
#include "op_arm_model.h"
#include "op_model_arm11_core.h"
+#include "evtmon_regs.h"
static int irqs[] = {
#ifdef CONFIG_ARCH_OMAP2
3,
#endif
+#ifdef CONFIG_ARCH_MXC
+ EVENT_OVERFLOW_INT,
+#endif
};
static void armv6_pmu_stop(void)
{
arm11_stop_pmu();
+ arm11_evtmon_stop();
arm11_release_interrupts(irqs, ARRAY_SIZE(irqs));
}
@@ -46,21 +51,31 @@ static int armv6_pmu_start(void)
int ret;
ret = arm11_request_interrupts(irqs, ARRAY_SIZE(irqs));
- if (ret >= 0)
+ if (ret >= 0){
ret = arm11_start_pmu();
+ arm11_evtmon_start();
+ }
return ret;
}
+static int armv6_setup_pmu(void)
+{
+ arm11_setup_pmu();
+ arm11_evtmon_setup_ctrs();
+ return 0;
+}
+
static int armv6_detect_pmu(void)
{
+ arm11_evtmon_detect();
return 0;
}
struct op_arm_model_spec op_armv6_spec = {
.init = armv6_detect_pmu,
.num_counters = 3,
- .setup_ctrs = arm11_setup_pmu,
+ .setup_ctrs = armv6_setup_pmu,
.start = armv6_pmu_start,
.stop = armv6_pmu_stop,
.name = "arm/armv6",