Commit 69bffebe authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP: Make oprofile work for ARM11

Make oprofile work for ARM11
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent e55451b1
...@@ -90,7 +90,11 @@ static struct pmu_type pmu_parms[] = { ...@@ -90,7 +90,11 @@ static struct pmu_type pmu_parms[] = {
.id = PMU_ARM11, .id = PMU_ARM11,
.name = "arm/arm11", .name = "arm/arm11",
.num_counters = 3, .num_counters = 3,
#ifdef CONFIG_ARCH_OMAP2
.interrupt = 3,
#else
.interrupt = -1, .interrupt = -1,
#endif
.int_mask = { [PMN0] = 0x10, [PMN1] = 0x20, .int_mask = { [PMN0] = 0x10, [PMN1] = 0x20,
[CCNT] = 0x40 }, [CCNT] = 0x40 },
.cnt_ovf = { [CCNT] = 0x400, [PMN0] = 0x100, .cnt_ovf = { [CCNT] = 0x400, [PMN0] = 0x100,
...@@ -238,7 +242,7 @@ static int arm11_pmu_start(void) ...@@ -238,7 +242,7 @@ static int arm11_pmu_start(void)
u32 pmnc = read_pmnc(); u32 pmnc = read_pmnc();
if (pmu->interrupt >= 0) { if (pmu->interrupt >= 0) {
ret = request_irq(pmu->interrupt, arm11_pmu_interrupt, SA_INTERRUPT, ret = request_irq(pmu->interrupt, arm11_pmu_interrupt, IRQF_DISABLED,
"ARM11 PMU", (void *)results); "ARM11 PMU", (void *)results);
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "oprofile: unable to request IRQ%d for ARM11 PMU\n", printk(KERN_ERR "oprofile: unable to request IRQ%d for ARM11 PMU\n",
...@@ -249,7 +253,6 @@ static int arm11_pmu_start(void) ...@@ -249,7 +253,6 @@ static int arm11_pmu_start(void)
pmnc |= pmu->int_enable; pmnc |= pmu->int_enable;
} }
printk("XXX enabling PMNC: %08x\n", pmnc);
pmnc |= PMU_ENABLE; pmnc |= PMU_ENABLE;
write_pmnc(pmnc); write_pmnc(pmnc);
pr_debug("arm11_pmu_start: pmnc: %#08x mask: %08x\n", pmnc, pmu->int_enable); pr_debug("arm11_pmu_start: pmnc: %#08x mask: %08x\n", pmnc, pmu->int_enable);
...@@ -273,15 +276,3 @@ struct op_arm_model_spec op_arm11_spec = { ...@@ -273,15 +276,3 @@ struct op_arm_model_spec op_arm11_spec = {
.start = arm11_pmu_start, .start = arm11_pmu_start,
.stop = arm11_pmu_stop, .stop = arm11_pmu_stop,
}; };
static int __init op_arm11_init(void)
{
int ret;
ret = arm11_detect_pmu();
if (ret == 0)
ret = arm11_pmu_start();
return ret;
}
subsys_initcall(op_arm11_init);
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