]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Make oprofile work for ARM11
authorTony Lindgren <tony@atomide.com>
Wed, 4 Oct 2006 14:29:47 +0000 (17:29 +0300)
committerTony Lindgren <tony@atomide.com>
Wed, 4 Oct 2006 14:29:47 +0000 (17:29 +0300)
Make oprofile work for ARM11

Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/oprofile/op_model_v6.c

index b9b156b320c7d3dcd7aacf04df64443d1b9f2a9b..55279db795404e9e5e5b2b178085a754d6f6a8c6 100644 (file)
@@ -90,7 +90,11 @@ static struct pmu_type pmu_parms[] = {
                .id             = PMU_ARM11,
                .name           = "arm/arm11",
                .num_counters   = 3,
+#ifdef CONFIG_ARCH_OMAP2
+               .interrupt      = 3,
+#else
                .interrupt      = -1,
+#endif
                .int_mask       = { [PMN0] = 0x10, [PMN1] = 0x20,
                                    [CCNT] = 0x40 },
                .cnt_ovf        = { [CCNT] = 0x400, [PMN0] = 0x100,
@@ -238,7 +242,7 @@ static int arm11_pmu_start(void)
        u32 pmnc = read_pmnc();
 
        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);
                if (ret < 0) {
                        printk(KERN_ERR "oprofile: unable to request IRQ%d for ARM11 PMU\n",
@@ -249,7 +253,6 @@ static int arm11_pmu_start(void)
                pmnc |= pmu->int_enable;
        }
 
-       printk("XXX enabling PMNC: %08x\n", pmnc);
        pmnc |= PMU_ENABLE;
        write_pmnc(pmnc);
        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 = {
        .start          = arm11_pmu_start,
        .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);