OMAP: Add new function to check wether there is irq pending
[linux-ginger.git] / arch / arm / oprofile / op_model_v6.c
blobfe581383d3e264d544a3bf02d142eb8194d81e77
1 /**
2 * @file op_model_v6.c
3 * ARM11 Performance Monitor Driver
5 * Based on op_model_xscale.c
7 * @remark Copyright 2000-2004 Deepak Saxena <dsaxena@mvista.com>
8 * @remark Copyright 2000-2004 MontaVista Software Inc
9 * @remark Copyright 2004 Dave Jiang <dave.jiang@intel.com>
10 * @remark Copyright 2004 Intel Corporation
11 * @remark Copyright 2004 Zwane Mwaikambo <zwane@arm.linux.org.uk>
12 * @remark Copyright 2004 OProfile Authors
14 * @remark Read the file COPYING
16 * @author Tony Lindgren <tony@atomide.com>
19 /* #define DEBUG */
20 #include <linux/types.h>
21 #include <linux/errno.h>
22 #include <linux/sched.h>
23 #include <linux/oprofile.h>
24 #include <linux/interrupt.h>
25 #include <asm/irq.h>
26 #include <asm/system.h>
28 #include "op_counter.h"
29 #include "op_arm_model.h"
30 #include "op_model_arm11_core.h"
32 static int irqs[] = {
33 #ifdef CONFIG_ARCH_OMAP2
35 #endif
38 static void armv6_pmu_stop(void)
40 arm11_stop_pmu();
41 arm11_release_interrupts(irqs, ARRAY_SIZE(irqs));
44 static int armv6_pmu_start(void)
46 int ret;
48 ret = arm11_request_interrupts(irqs, ARRAY_SIZE(irqs));
49 if (ret >= 0)
50 ret = arm11_start_pmu();
52 return ret;
55 static int armv6_detect_pmu(void)
57 return 0;
60 struct op_arm_model_spec op_armv6_spec = {
61 .init = armv6_detect_pmu,
62 .num_counters = 3,
63 .setup_ctrs = arm11_setup_pmu,
64 .start = armv6_pmu_start,
65 .stop = armv6_pmu_stop,
66 .name = "arm/armv6",