2 * Definitions for XScale 80312 PMON
3 * (C) 2001 Intel Corporation
4 * Author: Chen Chen(chen.chen@intel.com)
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.
11 #ifndef _IOP310_PMON_H_
12 #define _IOP310_PMON_H_
15 * Different modes for Event Select Register for intel 80312
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
27 typedef struct _iop310_pmon_result
29 u32 timestamp; /* Global Time Stamp Register */
30 u32 timestamp_overflow; /* Time Stamp overflow count */
31 u32 event_count[14]; /* Programmable Event Counter
33 u32 event_overflow[14]; /* Overflow counter for PECR1-14 */
36 /* function prototypes */
38 /* Claim IQ80312 PMON for usage */
39 int iop310_pmon_claim(void);
41 /* Start IQ80312 PMON */
42 int iop310_pmon_start(int, int);
44 /* Stop Performance Monitor Unit */
45 int iop310_pmon_stop(iop310_pmon_res_t *);
47 /* Release IQ80312 PMON */
48 int iop310_pmon_release(int);