[POWERPC] cell: PMU register macros
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / powerpc / platforms / cell / pmu.h
blobeb1e8e0af9104a1b6891116c36da1e7e3ddfbf15
1 /*
2 * Cell Broadband Engine Performance Monitor
4 * (C) Copyright IBM Corporation 2001,2006
6 * Author:
7 * David Erb (djerb@us.ibm.com)
8 * Kevin Corry (kevcorry@us.ibm.com)
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2, or (at your option)
13 * any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifndef __PERFMON_H__
26 #define __PERFMON_H__
28 enum pm_reg_name {
29 group_control,
30 debug_bus_control,
31 trace_address,
32 ext_tr_timer,
33 pm_status,
34 pm_control,
35 pm_interval,
36 pm_start_stop,
39 extern u32 cbe_read_phys_ctr(u32 cpu, u32 phys_ctr);
40 extern void cbe_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val);
41 extern u32 cbe_read_ctr(u32 cpu, u32 ctr);
42 extern void cbe_write_ctr(u32 cpu, u32 ctr, u32 val);
44 extern u32 cbe_read_pm07_control(u32 cpu, u32 ctr);
45 extern void cbe_write_pm07_control(u32 cpu, u32 ctr, u32 val);
46 extern u32 cbe_read_pm (u32 cpu, enum pm_reg_name reg);
47 extern void cbe_write_pm (u32 cpu, enum pm_reg_name reg, u32 val);
49 extern u32 cbe_get_ctr_size(u32 cpu, u32 phys_ctr);
50 extern void cbe_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size);
52 extern void cbe_enable_pm(u32 cpu);
53 extern void cbe_disable_pm(u32 cpu);
55 extern void cbe_read_trace_buffer(u32 cpu, u64 *buf);
57 #endif