ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-arm / arch-iop3xx / pmon.h
1 /*
2  * Definitions for XScale 80312 PMON
3  * (C) 2001 Intel Corporation
4  * Author: Chen Chen(chen.chen@intel.com)
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10
11 #ifndef _IOP310_PMON_H_
12 #define _IOP310_PMON_H_
13
14 /*
15  *  Different modes for Event Select Register for intel 80312
16  */
17
18 #define IOP310_PMON_MODE0                0x00000000
19 #define IOP310_PMON_MODE1                0x00000001
20 #define IOP310_PMON_MODE2                0x00000002
21 #define IOP310_PMON_MODE3                0x00000003
22 #define IOP310_PMON_MODE4                0x00000004
23 #define IOP310_PMON_MODE5                0x00000005
24 #define IOP310_PMON_MODE6                0x00000006
25 #define IOP310_PMON_MODE7                0x00000007
26
27 typedef struct _iop310_pmon_result
28 {
29         u32 timestamp;                  /* Global Time Stamp Register */
30         u32 timestamp_overflow;         /* Time Stamp overflow count */
31         u32 event_count[14];            /* Programmable Event Counter
32                                            Registers 1-14 */
33         u32 event_overflow[14];         /* Overflow counter for PECR1-14 */
34 } iop310_pmon_res_t;
35
36 /* function prototypes */
37
38 /* Claim IQ80312 PMON for usage */
39 int iop310_pmon_claim(void);
40
41 /* Start IQ80312 PMON */
42 int iop310_pmon_start(int, int);
43
44 /* Stop Performance Monitor Unit */
45 int iop310_pmon_stop(iop310_pmon_res_t *);
46
47 /* Release IQ80312 PMON */
48 int iop310_pmon_release(int);
49
50 #endif